Class Project
java.lang.Object
org.ametys.plugins.repository.AbstractAmetysObject
org.ametys.plugins.repository.jcr.SimpleAmetysObject<F>
org.ametys.plugins.repository.jcr.DefaultTraversableAmetysObject<ProjectFactory>
org.ametys.plugins.workspaces.project.objects.Project
- All Implemented Interfaces:
ACLAmetysObject
,ActivityHolder
,ActivityHolderAmetysObject
,AmetysObject
,DataAwareAmetysObject
,ModelLessDataAwareAmetysObject
,ModifiableModelLessDataAwareAmetysObject
,DataHolder
,ModelLessDataHolder
,ModifiableDataHolder
,ModifiableModelLessDataHolder
,JCRAmetysObject
,JCRTraversableAmetysObject
,MetadataAwareAmetysObject
,ModifiableMetadataAwareAmetysObject
,ModifiableACLAmetysObject
,ModifiableAmetysObject
,ModifiableTraversableAmetysObject
,RemovableAmetysObject
,TraversableAmetysObject
public class Project
extends DefaultTraversableAmetysObject<ProjectFactory>
implements ModifiableModelLessDataAwareAmetysObject, ActivityHolderAmetysObject
AmetysObject
for storing project informations.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
The inscription status of the project -
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Attribute name for project 's sitestatic final String
Project node type name.Fields inherited from interface org.ametys.plugins.repository.activities.ActivityHolder
ACTIVITIES_ROOT_NODE_NAME, ACTIVITY_NAME_PREFIX, JCR_UTC_FORMAT
-
Constructor Summary
ConstructorDescriptionProject
(javax.jcr.Node node, String parentPath, ProjectFactory factory) Creates aProject
. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCategory
(String category) Add a category to the projectvoid
Add a module to the list of activated modulesvoid
coverImageToSAX
(ContentHandler contentHandler) Generates SAX events for the project's cover imageReturns the activity holder holding the activitiesRetrieve the list of categoriesReturns the cover image of the projectRetrieves the date of creation.Returns theDataHolder
of thisAmetysObject
.Get the default profile for new members of the projectRetrieves the description.Retrieves the explorer nodes.Retrieves the explorer nodes.Get the inscription status of the projectString[]
Retrieve the list of keywords for the projectRetrieves the mailing list.Get the project managers user identitiesString[]
Retrieve the list of activated modules for the projectGet the root for pluginsgetSite()
Get the site of the projectgetTags()
Retrieve the list of tagsgetTitle()
Retrieves the title.void
removeCategory
(String category) Remove a category from the projectvoid
Remove the description.void
Remove the mailing list.void
removeModule
(String moduleId) Remove a module from the list of activated modulesvoid
setCategoryTags
(List<String> categoryTags) Set the category tags of the projectvoid
setCoverImage
(InputStream is, String mimeType, String filename, ZonedDateTime lastModificationDate) Set the cover image of the sitevoid
setCreationDate
(ZonedDateTime creationDate) Set the date of creation.void
setDefaultProfile
(String profileId) Set the default profile for the members of the projectvoid
setDescription
(String description) Set the description.void
setInscriptionStatus
(String inscriptionStatus) Set the inscription status of the projectvoid
setInscriptionStatus
(Project.InscriptionStatus inscriptionStatus) Set the inscription status of the projectvoid
setKeywords
(String[] keywords) Set the list of keywordss for the projectvoid
setMailingList
(String mailingList) Set the mailing list.void
setManagers
(UserIdentity[] user) Set the project managersvoid
setModules
(String[] modules) Set the list of activated modules for the projectvoid
Get the site of the projectvoid
Set the project tagsvoid
Set the title.void
Add a tag to the projectvoid
Remove a tag from the projectMethods inherited from class org.ametys.plugins.repository.jcr.DefaultTraversableAmetysObject
addAllowedGroups, addAllowedProfilesForAnonymous, addAllowedProfilesForAnyConnectedUser, addAllowedUsers, addDeniedGroups, addDeniedProfilesForAnonymous, addDeniedProfilesForAnyConnectedUser, addDeniedUsers, createChild, disallowInheritance, getChild, getChildren, getProfilesForAnonymousAndAnyConnectedUser, getProfilesForGroups, getProfilesForUsers, hasChild, isInheritanceDisallowed, removeAllowedGroups, removeAllowedGroups, removeAllowedProfilesForAnonymous, removeAllowedProfilesForAnyConnectedUser, removeAllowedUsers, removeAllowedUsers, removeDeniedGroups, removeDeniedGroups, removeDeniedProfilesForAnonymous, removeDeniedProfilesForAnyConnectedUser, removeDeniedUsers, removeDeniedUsers
Methods inherited from class org.ametys.plugins.repository.jcr.SimpleAmetysObject
_getFactory, _invalidateName, _invalidateParentPath, getId, getMetadataHolder, getName, getNode, getParent, getParentPath, getPath, needsSave, remove, rename, revertChanges, saveChanges
Methods inherited from class org.ametys.plugins.repository.AbstractAmetysObject
equals, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.ametys.plugins.repository.activities.ActivityHolder
addActivity
Methods inherited from interface org.ametys.plugins.repository.activities.ActivityHolderAmetysObject
addActivity, addActivity, getActivities
Methods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, getId, getName, getParent, getParentPath, getPath, hashCode
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.DataAwareAmetysObject
copyTo, copyTo, dataToJSON, dataToJSON, dataToSAX, dataToSAX, getDataNames
Methods inherited from interface org.ametys.plugins.repository.jcr.JCRAmetysObject
getNode
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModelLessDataAwareAmetysObject
dataToJSON, dataToSAX, getModelItemTypeExtensionPoint, getType, getValue, getValue, getValueOfType, getValueOfType, hasDifferences, hasValue, hasValue, hasValueOrEmpty, isMultiple, isMultiple
Methods inherited from interface org.ametys.plugins.repository.data.holder.ModelLessDataHolder
dataToJSON, dataToSAX, hasValue, hasValueOrEmpty
Methods inherited from interface org.ametys.plugins.repository.ModifiableAmetysObject
needsSave, rename, revertChanges, saveChanges
Methods inherited from interface org.ametys.plugins.repository.metadata.ModifiableMetadataAwareAmetysObject
getMetadataHolder
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModifiableModelLessDataAwareAmetysObject
getComposite, getComposite, getParentDataHolder, getRepositoryData, getRootDataHolder, removeValue, setValue, setValue, synchronizeValues
Methods inherited from interface org.ametys.plugins.repository.RemovableAmetysObject
remove
Methods inherited from interface org.ametys.plugins.repository.TraversableAmetysObject
getChildAt, getChildPosition
-
Field Details
-
NODE_TYPE
Project node type name.- See Also:
-
DATA_SITE
Attribute name for project 's site- See Also:
-
-
Constructor Details
-
Project
Creates aProject
.- Parameters:
node
- the node backing thisAmetysObject
.parentPath
- the parent path in the Ametys hierarchy.factory
- theProjectFactory
which creates the AmetysObject.
-
-
Method Details
-
getDataHolder
Description copied from interface:DataAwareAmetysObject
Returns theDataHolder
of thisAmetysObject
.- Specified by:
getDataHolder
in interfaceDataAwareAmetysObject
- Specified by:
getDataHolder
in interfaceModelLessDataAwareAmetysObject
- Specified by:
getDataHolder
in interfaceModifiableModelLessDataAwareAmetysObject
- Returns:
- the
DataHolder
of thisAmetysObject
-
getActivityHolder
Description copied from interface:ActivityHolderAmetysObject
Returns the activity holder holding the activities- Specified by:
getActivityHolder
in interfaceActivityHolderAmetysObject
- Returns:
- the activity holder
- Throws:
javax.jcr.RepositoryException
- if failed to get activity holder node
-
getTitle
Retrieves the title.- Returns:
- the title.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setTitle
Set the title.- Parameters:
title
- the title.- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDescription
Retrieves the description.- Returns:
- the description.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDescription
Set the description.- Parameters:
description
- the description.- Throws:
AmetysRepositoryException
- if an error occurs.
-
removeDescription
Remove the description.- Throws:
AmetysRepositoryException
- if an error occurs.
-
getExplorerRootNode
Retrieves the explorer nodes.- Returns:
- the explorer nodes or an empty
AmetysObjectIterable
. - Throws:
AmetysRepositoryException
- if an error occurs.
-
getExplorerNodes
Retrieves the explorer nodes.- Returns:
- the explorer nodes or an empty
AmetysObjectIterable
. - Throws:
AmetysRepositoryException
- if an error occurs.
-
getMailingList
Retrieves the mailing list.- Returns:
- the mailing list.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setMailingList
Set the mailing list.- Parameters:
mailingList
- the mailing list.- Throws:
AmetysRepositoryException
- if an error occurs.
-
removeMailingList
Remove the mailing list.- Throws:
AmetysRepositoryException
- if an error occurs.
-
getCreationDate
Retrieves the date of creation.- Returns:
- the date of creation.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setCreationDate
Set the date of creation.- Parameters:
creationDate
- the date of creation- Throws:
AmetysRepositoryException
- if an error occurs.
-
getSite
Get the site of the project- Returns:
- The site. Can be null if the reference is broken.
-
setSite
Get the site of the project- Parameters:
site
- the site to set
-
getManagers
Get the project managers user identities- Returns:
- The managers
-
setManagers
Set the project managers- Parameters:
user
- The managers
-
getModules
Retrieve the list of activated modules for the project- Returns:
- The list of modules ids
-
setModules
Set the list of activated modules for the project- Parameters:
modules
- The list of modules
-
addModule
Add a module to the list of activated modules- Parameters:
moduleId
- The module id
-
removeModule
Remove a module from the list of activated modules- Parameters:
moduleId
- The module id
-
getInscriptionStatus
Get the inscription status of the project- Returns:
- The inscription status
-
setInscriptionStatus
Set the inscription status of the project- Parameters:
inscriptionStatus
- The inscription status
-
setInscriptionStatus
Set the inscription status of the project- Parameters:
inscriptionStatus
- The inscription status
-
getDefaultProfile
Get the default profile for new members of the project- Returns:
- The default profile
-
setDefaultProfile
Set the default profile for the members of the project- Parameters:
profileId
- The ID of the profile
-
getRootPlugins
Get the root for plugins- Returns:
- the root for plugins
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getTags
Retrieve the list of tags- Returns:
- The list of tags
- Throws:
AmetysRepositoryException
- if an error occurs
-
tag
Add a tag to the project- Parameters:
tag
- The tag- Throws:
AmetysRepositoryException
- if an error occurs
-
untag
Remove a tag from the project- Parameters:
tag
- The tag- Throws:
AmetysRepositoryException
- if an error occurs
-
setTags
Set the project tags- Parameters:
tags
- The list of tags
-
getCategories
Retrieve the list of categories- Returns:
- The categories
- Throws:
AmetysRepositoryException
- if an error occurs
-
addCategory
Add a category to the project- Parameters:
category
- The category- Throws:
AmetysRepositoryException
- if an error occurs
-
removeCategory
Remove a category from the project- Parameters:
category
- The category- Throws:
AmetysRepositoryException
- if an error occurs
-
setCategoryTags
Set the category tags of the project- Parameters:
categoryTags
- The category tags
-
setCoverImage
public void setCoverImage(InputStream is, String mimeType, String filename, ZonedDateTime lastModificationDate) throws IOException Set the cover image of the site- Parameters:
is
- The input stream of the cover imagemimeType
- The mimetype of the cover imagefilename
- The filename of the cover imagelastModificationDate
- The last modification date of the cover image- Throws:
IOException
- if an error occurs while setting the cover image
-
getCoverImage
Returns the cover image of the project- Returns:
- the cover image of the project
-
coverImageToSAX
Generates SAX events for the project's cover image- Parameters:
contentHandler
- theContentHandler
that will receive the SAX events- Throws:
SAXException
- if error occurs during the SAX events generationIOException
- if an I/O error occurs while reading the cover image
-
getKeywords
Retrieve the list of keywords for the project- Returns:
- The list of keywords
-
setKeywords
Set the list of keywordss for the project- Parameters:
keywords
- The list of keywords
-