Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -153,4 +153,11 @@ public interface EventService {
* @param profileId identifier of the profile that we want to remove it's events
*/
void removeProfileEvents(String profileId);

/**
* Deletes the event identified by the given identifier from persistence.
*
* @param eventIdentifier the unique identifier for the event
*/
void deleteEvent(String eventIdentifier);
}
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,13 @@ default Session loadSession(String sessionId) {
*/
void removeProfileSessions(String profileId);

/**
* Deletes the session identified by the given identifier from persistence.
*
* @param sessionIdentifier the unique identifier for the session
*/
void deleteSession(String sessionIdentifier);

/**
* Checks whether the specified profile and/or session satisfy the specified condition.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -336,4 +336,9 @@ public void removeProfileEvents(String profileId){

persistenceService.removeByQuery(profileCondition,Event.class);
}

@Override
public void deleteEvent(String eventIdentifier) {
persistenceService.remove(eventIdentifier, Event.class);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,11 @@ public void removeProfileSessions(String profileId) {
persistenceService.removeByQuery(profileCondition, Session.class);
}

@Override
public void deleteSession(String sessionIdentifier) {
persistenceService.remove(sessionIdentifier, Session.class);
}

@Override
public boolean matchCondition(Condition condition, Profile profile, Session session) {
ParserHelper.resolveConditionType(definitionsService, condition, "profile " + profile.getItemId() + " matching");
Expand Down
14 changes: 14 additions & 0 deletions tools/shell-dev-commands/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,19 @@
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient-osgi</artifactId>
<version>${httpclient-osgi.version}</version>
<type>bundle</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
</dependency>

<dependency>
<groupId>junit</groupId>
Expand All @@ -115,6 +121,14 @@
<configuration>
<instructions>
<Karaf-Commands>*</Karaf-Commands>
<Export-Package>
org.apache.unomi.shell.dev.services,
org.apache.unomi.shell.dev.commands
</Export-Package>
<_dsannotations>*</_dsannotations>
<_dsannotations-options>inherit</_dsannotations-options>
<_metatypeannotations>*</_metatypeannotations>
<_metatypeannotations-options>version;nested</_metatypeannotations-options>
</instructions>
</configuration>
</plugin>
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading
Loading