public class ActivityStreamClientInteraction extends Object implements Component, Serviceable, PluginAware
Modifier and Type | Field and Description |
---|---|
private CurrentUserProvider |
_currentUserProvider |
private EventTypeExtensionPoint |
_eventTypeExtensionPoint |
private String |
_pluginName |
private ProjectManager |
_projectManager |
private Repository |
_repository |
private RightManager |
_rightManager |
static String |
ROLE
The Avalon role
|
Constructor and Description |
---|
ActivityStreamClientInteraction() |
Modifier and Type | Method and Description |
---|---|
private void |
_classifyEventType(Map<String,Map<String,Object>> allowedEventTypes,
String eventTypeId,
I18nizableText eventTypeLabel) |
private Set<String> |
_getAllowedEventTypesByProject(Project project) |
private String |
_getXPathQuery(Expression expr,
SortCriteria sortCriteria) |
private NodeIterator |
_query(String jcrQuery) |
Set<String> |
getAllowedEventTypes(List<Project> projects)
Get the list of allowed event types for the given projects
|
Map<String,Map<String,Object>> |
getAllowedEventTypes(String projectName)
Get the allowed event types classified by categories
|
List<Map<String,Object>> |
getEvents(List<String> projectNames,
List<String> filterEventTypes,
int limit)
Get the events of the given projects and of the given event types
|
List<Map<String,Object>> |
getProjectEvents(String projectName,
List<String> filterEventTypes,
int limit)
Get the events of the given project and of the given event types
|
void |
service(ServiceManager serviceManager) |
void |
setPluginInfo(String pluginName,
String featureName,
String id)
Sets the plugin info relative to the current component.
Note : The feature name may be null if the targeted component in declared at plugin level. |
private ProjectManager _projectManager
private EventTypeExtensionPoint _eventTypeExtensionPoint
private CurrentUserProvider _currentUserProvider
private RightManager _rightManager
private Repository _repository
private String _pluginName
public ActivityStreamClientInteraction()
public void service(ServiceManager serviceManager) throws ServiceException
service
in interface Serviceable
ServiceException
public void setPluginInfo(String pluginName, String featureName, String id)
PluginAware
setPluginInfo
in interface PluginAware
pluginName
- Unique identifier for the plugin hosting the extensionfeatureName
- Unique feature identifier (unique for a given pluginName)id
- Unique identifier of this componentpublic List<Map<String,Object>> getProjectEvents(String projectName, List<String> filterEventTypes, int limit) throws RepositoryException
projectName
- the project's namefilterEventTypes
- the type of events to retainlimit
- The max number of eventsRepositoryException
- if an error occurs while manipulating the repositorypublic List<Map<String,Object>> getEvents(List<String> projectNames, List<String> filterEventTypes, int limit) throws RepositoryException
projectNames
- the names of the projects. Can not be null.filterEventTypes
- the type of events to retain. Can be empty to get all events.limit
- The max number of eventsRepositoryException
- if an error occurs while manipulating the repositoryprivate String _getXPathQuery(Expression expr, SortCriteria sortCriteria)
private NodeIterator _query(String jcrQuery)
public Map<String,Map<String,Object>> getAllowedEventTypes(String projectName)
projectName
- The project's nameprivate void _classifyEventType(Map<String,Map<String,Object>> allowedEventTypes, String eventTypeId, I18nizableText eventTypeLabel)
public Set<String> getAllowedEventTypes(List<Project> projects)
projects
- The projectsprivate Set<String> _getAllowedEventTypesByProject(Project project)