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
Nested ClassesModifier and TypeClassDescriptionstatic enumThe inscription status of the project -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringAttribute name for project 's sitestatic final StringProject 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
ConstructorsConstructorDescriptionProject(javax.jcr.Node node, String parentPath, ProjectFactory factory) Creates aProject. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCategory(String category) Add a category to the projectvoidAdd a module to the list of activated modulesvoidcoverImageToSAX(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 theDataHolderof 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.voidremoveCategory(String category) Remove a category from the projectvoidRemove the description.voidRemove the mailing list.voidremoveModule(String moduleId) Remove a module from the list of activated modulesvoidsetCategoryTags(List<String> categoryTags) Set the category tags of the projectvoidsetCoverImage(InputStream is, String mimeType, String filename, ZonedDateTime lastModificationDate) Set the cover image of the sitevoidsetCreationDate(ZonedDateTime creationDate) Set the date of creation.voidsetDefaultProfile(String profileId) Set the default profile for the members of the projectvoidsetDescription(String description) Set the description.voidsetInscriptionStatus(String inscriptionStatus) Set the inscription status of the projectvoidsetInscriptionStatus(Project.InscriptionStatus inscriptionStatus) Set the inscription status of the projectvoidsetKeywords(String[] keywords) Set the list of keywordss for the projectvoidsetMailingList(String mailingList) Set the mailing list.voidsetManagers(UserIdentity[] user) Set the project managersvoidsetModules(String[] modules) Set the list of activated modules for the projectvoidGet the site of the projectvoidSet the project tagsvoidSet the title.voidAdd a tag to the projectvoidRemove 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, removeDeniedUsersMethods inherited from class org.ametys.plugins.repository.jcr.SimpleAmetysObject
_getFactory, _invalidateName, _invalidateParentPath, getId, getMetadataHolder, getName, getNode, getParent, getParentPath, getPath, needsSave, remove, rename, revertChanges, saveChangesMethods inherited from class org.ametys.plugins.repository.AbstractAmetysObject
equals, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.ametys.plugins.repository.activities.ActivityHolder
addActivityMethods inherited from interface org.ametys.plugins.repository.activities.ActivityHolderAmetysObject
addActivity, addActivity, getActivitiesMethods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, getId, getName, getParent, getParentPath, getPath, hashCodeMethods inherited from interface org.ametys.plugins.repository.data.ametysobject.DataAwareAmetysObject
copyTo, dataToJSON, dataToJSON, dataToSAX, dataToSAX, getDataNamesMethods inherited from interface org.ametys.plugins.repository.jcr.JCRAmetysObject
getNodeMethods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModelLessDataAwareAmetysObject
dataToJSON, dataToSAX, getModelItemTypeExtensionPoint, getType, getValue, getValue, getValueOfType, getValueOfType, hasValue, hasValue, hasValueOrEmpty, isMultiple, isMultipleMethods inherited from interface org.ametys.plugins.repository.data.holder.ModelLessDataHolder
dataToJSON, dataToSAX, hasValue, hasValueOrEmptyMethods inherited from interface org.ametys.plugins.repository.ModifiableAmetysObject
needsSave, rename, revertChanges, saveChangesMethods inherited from interface org.ametys.plugins.repository.metadata.ModifiableMetadataAwareAmetysObject
getMetadataHolderMethods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModifiableModelLessDataAwareAmetysObject
getComposite, getComposite, getParentDataHolder, getRepositoryData, getRootDataHolder, removeValue, setValue, setValue, synchronizeValuesMethods inherited from interface org.ametys.plugins.repository.RemovableAmetysObject
removeMethods 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- theProjectFactorywhich creates the AmetysObject.
-
-
Method Details
-
getDataHolder
Description copied from interface:DataAwareAmetysObjectReturns theDataHolderof thisAmetysObject.- Specified by:
getDataHolderin interfaceDataAwareAmetysObject- Specified by:
getDataHolderin interfaceModelLessDataAwareAmetysObject- Specified by:
getDataHolderin interfaceModifiableModelLessDataAwareAmetysObject- Returns:
- the
DataHolderof thisAmetysObject
-
getActivityHolder
Description copied from interface:ActivityHolderAmetysObjectReturns the activity holder holding the activities- Specified by:
getActivityHolderin 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- theContentHandlerthat 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
-