Class MembersWorkspaceModule
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.plugins.workspaces.AbstractWorkspaceModule
org.ametys.plugins.workspaces.members.MembersWorkspaceModule
- All Implemented Interfaces:
Comparable<WorkspaceModule>,WorkspaceModule,LogEnabled,PluginAware,Contextualizable,Serviceable
Helper component for managing members
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassBean representing a invitation by email -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe id of members modulestatic final StringId of service of membersFields inherited from class org.ametys.plugins.workspaces.AbstractWorkspaceModule
__SIZE_ERROR, __SIZE_INACTIVE, _activityStream, _context, _currentUserProvider, _i18nUtils, _modulesEP, _observationManager, _pageDAO, _pluginName, _projectManager, _projectRightHelper, _resolver, _rightManager, _serviceEP, _skinsManager, _userHelper, _userManagerFields inherited from interface org.ametys.plugins.workspaces.project.modules.WorkspaceModule
GROUP_HEADER_ACTIVATED_ID, GROUP_HEADER_ELEMENTS_ID, GROUP_HEADER_LAST_ACTIVITY_ID, GROUP_HEADER_SIZE_ID, ORDER_ABOUT, ORDER_ALERTS, ORDER_CALENDAR, ORDER_DOCUMENTS, ORDER_MEMBERS, ORDER_MINISITE, ORDER_NEWS, ORDER_TASKS, ORDER_THREADS, ORDER_WALLCONTENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the headers of statistics_getInternalStatistics(Project project, boolean isActive) Get the internal statistics of the moduleprotected booleanCheck if activated status should be shown or notaddInvitation(Project project, Date invitDate, String mail, UserIdentity author, Map<String, String> allowedProfileByModules) Add an invitationGet the set of all event type for the moduleGet the set of allowed event type for the modulegetId()Get the module IdgetInvitations(String email) Get the invitations for a given mailgetInvitations(Project project) Returns the invitation sorted by ascending datejavax.jcr.NodegetInvitationsRootNode(Project project, boolean create) Get the node holding the invitationsgetInvitationXPathQuery(Project project, Expression invitExpression, SortCriteria sortCriteria) Creates the XPath query corresponding to specifiedExpression.Get the module titleGet the module nameprotected StringReturns the module page's nameprotected I18nizableTextReturns the module page's title as i18ngetModuleRoot(Project project, boolean create) Get the module root node for the given projectGet the module titleintgetOrder()Get the module orderprotected voidinitializeModulePage(ModifiablePage memberPage) Initialize the module pagebooleaninvitationExists(Project project, String mail) Determines if a invitation already exists for this emailbooleanremoveInvitation(Project project, String mail) Remove a invitationvoidservice(ServiceManager smanager) Methods inherited from class org.ametys.plugins.workspaces.AbstractWorkspaceModule
_createModulePage, _deleteActivities, _deletePages, _getAmetysObject, _getDefaultXslt, _getModuleLastActivity, _getModulePages, _getModuleSize, _internalActivateModule, _internalDeactivateModule, _internalDeleteData, _setPagesVisibility, _showLastActivity, _showModuleSize, activateModule, contextualize, deactivateModule, deleteData, getModulePageTemplate, getModuleSizeKey, getModuleUrl, getStatisticModel, getStatistics, initializeSitemap, setPluginInfoMethods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLoggerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.ametys.plugins.workspaces.project.modules.WorkspaceModule
compareTo, isUnactivatedByDefault
-
Field Details
-
MEMBERS_MODULE_ID
The id of members module -
MEMBERS_SERVICE_ID
Id of service of members- See Also:
-
-
Constructor Details
-
MembersWorkspaceModule
public MembersWorkspaceModule()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Overrides:
servicein classAbstractWorkspaceModule- Throws:
ServiceException
-
getId
Description copied from interface:WorkspaceModuleGet the module Id- Returns:
- The module ID
-
getOrder
Description copied from interface:WorkspaceModuleGet the module order- Returns:
- the priority in menus
-
getModuleName
Description copied from interface:WorkspaceModuleGet the module name- Returns:
- the module name
-
getModulePageName
Description copied from class:AbstractWorkspaceModuleReturns the module page's name- Specified by:
getModulePageNamein classAbstractWorkspaceModule- Returns:
- The module page's name
-
getModuleTitle
Description copied from interface:WorkspaceModuleGet the module title- Returns:
- The title
-
getModuleDescription
Description copied from interface:WorkspaceModuleGet the module title- Returns:
- The title
-
getModulePageTitle
Description copied from class:AbstractWorkspaceModuleReturns the module page's title as i18n- Specified by:
getModulePageTitlein classAbstractWorkspaceModule- Returns:
- The module page's title
-
initializeModulePage
Description copied from class:AbstractWorkspaceModuleInitialize the module page- Specified by:
initializeModulePagein classAbstractWorkspaceModule- Parameters:
memberPage- The module page
-
getModuleRoot
Description copied from interface:WorkspaceModuleGet the module root node for the given project- Parameters:
project- The project containing the modulecreate- True to create the node if it does not exists- Returns:
- The root node, or null if it does not exists and was not created
-
getAllowedEventTypes
Description copied from interface:WorkspaceModuleGet the set of allowed event type for the module- Returns:
- The set of allowed event types
-
getInvitationsRootNode
public javax.jcr.Node getInvitationsRootNode(Project project, boolean create) throws javax.jcr.RepositoryException Get the node holding the invitations- Parameters:
project- The projectcreate- true to create the node if it does not exist- Returns:
- the invitations' root node
- Throws:
javax.jcr.RepositoryException- if an error occurred
-
getInvitations
Get the invitations for a given mail- Parameters:
email- the email- Returns:
- the invitations
-
getInvitations
public List<MembersWorkspaceModule.Invitation> getInvitations(Project project) throws javax.jcr.RepositoryException Returns the invitation sorted by ascending date- Parameters:
project- The project- Returns:
- The invitations node
- Throws:
javax.jcr.RepositoryException- if an error occurred
-
getInvitationXPathQuery
public String getInvitationXPathQuery(Project project, Expression invitExpression, SortCriteria sortCriteria) throws javax.jcr.RepositoryException Creates the XPath query corresponding to specifiedExpression.- Parameters:
project- The project. Can be null to browser all projectsinvitExpression- the query predicates.sortCriteria- the sort criteria.- Returns:
- the created XPath query.
- Throws:
javax.jcr.RepositoryException- if an error occurred
-
addInvitation
public MembersWorkspaceModule.Invitation addInvitation(Project project, Date invitDate, String mail, UserIdentity author, Map<String, String> allowedProfileByModules) throws javax.jcr.RepositoryExceptionAdd an invitation- Parameters:
project- The projectmail- The mailinvitDate- The invitation's dateauthor- The invitation's authorallowedProfileByModules- The allowed profiles by modules- Returns:
- The created invitation node
- Throws:
javax.jcr.RepositoryException- if an error occurred
-
invitationExists
Determines if a invitation already exists for this email- Parameters:
project- the projectmail- the mail to test- Returns:
- true if a invitation exists
- Throws:
javax.jcr.RepositoryException- if an error occured
-
removeInvitation
Remove a invitation- Parameters:
project- the projectmail- the mail to remove- Returns:
- true if a invitation has been removed
- Throws:
javax.jcr.RepositoryException- if an error occured
-
_getInternalStatistics
Description copied from class:AbstractWorkspaceModuleGet the internal statistics of the module- Overrides:
_getInternalStatisticsin classAbstractWorkspaceModule- Parameters:
project- The projectisActive- true if module is active- Returns:
- a map of internal statistics
-
_getInternalStatisticModel
Description copied from class:AbstractWorkspaceModuleGet the headers of statistics- Overrides:
_getInternalStatisticModelin classAbstractWorkspaceModule- Returns:
- a list of statistics headers
-
_showActivatedStatus
Description copied from class:AbstractWorkspaceModuleCheck if activated status should be shown or not- Overrides:
_showActivatedStatusin classAbstractWorkspaceModule- Returns:
- true if activated status should be shown
-
getAllEventTypes
Description copied from interface:WorkspaceModuleGet the set of all event type for the module- Specified by:
getAllEventTypesin interfaceWorkspaceModule- Overrides:
getAllEventTypesin classAbstractWorkspaceModule- Returns:
- The set of all event types
-