Package org.ametys.odf.coursepart
Class CoursePart
-
- All Implemented Interfaces:
CommentableContent
,CommentableAmetysObject
,Content
,ModifiableContent
,ModifiableWorkflowAwareContent
,ReactionableObject
,ReportableObject
,WorkflowAwareContent
,ACLAmetysObject
,AmetysObject
,CopiableAmetysObject
,DataAwareAmetysObject
,ModelAwareDataAwareAmetysObject
,ModifiableModelAwareDataAwareAmetysObject
,DataHolder
,ModelAwareDataHolder
,ModifiableDataHolder
,ModifiableModelAwareDataHolder
,DublinCoreAwareAmetysObject
,ModifiableDublinCoreAwareAmetysObject
,JCRAmetysObject
,JCRTraversableAmetysObject
,LockableAmetysObject
,LockAwareAmetysObject
,MetadataAwareAmetysObject
,ModifiableMetadataAwareAmetysObject
,ModifiableACLAmetysObject
,ModifiableAmetysObject
,ModifiableTraversableAmetysObject
,RemovableAmetysObject
,TagAwareAmetysObject
,TaggableAmetysObject
,TraversableAmetysObject
,DataAndVersionAwareAmetysObject
,ModifiableDataAwareVersionableAmetysObject
,VersionableAmetysObject
,VersionAwareAmetysObject
,WorkflowAwareAmetysObject
public class CoursePart extends ModifiableDefaultContent<CoursePartFactory>
Class representing aCoursePart
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.ametys.cms.repository.ReactionableObject
ReactionableObject.ReactionType
-
-
Field Summary
Fields Modifier and Type Field Description static String
CATALOG
The attribute holding the catalogstatic String
CODE
The attribute holding the codestatic String
COURSE_HOLDER
Name of attribute for course holderstatic String
NATURE
Constants for attribute 'nature'static String
NB_HOURS
Constants for attribute 'nbHours'static String
PARENT_COURSES
Name of attribute for parent courses-
Fields inherited from class org.ametys.cms.repository.DefaultContent
ATTACHMENTS_NODE_NAME, DEFAULT_CONTENT_LOCALE, METADATA_CONTENTTYPE, METADATA_CONTRIBUTOR, METADATA_CREATION, METADATA_CREATOR, METADATA_FIRST_VALIDATION, METADATA_LANGUAGE, METADATA_LAST_MAJORVALIDATION, METADATA_LAST_VALIDATION, METADATA_MIXINCONTENTTYPES, METADATA_MODIFIED, METADATA_OUTGOING_REFERENCE_NODETYPE, METADATA_OUTGOING_REFERENCE_PROPERTY, METADATA_OUTGOING_REFERENCES, METADATA_OUTGOING_REFERENCES_PATH_PROPERTY, METADATA_ROOT_OUTGOING_REFERENCES
-
Fields inherited from class org.ametys.plugins.repository.jcr.DefaultAmetysObject
PROTECTED_PROPERTIES
-
Fields inherited from interface org.ametys.cms.repository.Content
ATTRIBUTE_TITLE, METADATA_TITLE
-
Fields inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
ALTERNATIVE_SUFFIX, COMMENTS_SUFFIX, STATUS_SUFFIX
-
-
Constructor Summary
Constructors Constructor Description CoursePart(Node node, String parentPath, CoursePartFactory factory)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCatalog()
Get the catalog.String
getCode()
Get the code.Course
getCourseHolder()
Get the course holderList<Course>
getCourses()
Get the parent courses.String
getNature()
Get the nature.double
getNumberOfHours()
Get the number of hoursSet<Program>
getRootPrograms()
Returns the programs holding this course part through the coursesvoid
setCatalog(String catalog)
Set the catalog.void
setCode(String code)
Set the code.-
Methods inherited from class org.ametys.cms.repository.ModifiableDefaultContent
createComment, createComment, fillContent, getComment, getComments, getCurrentStepId, getDataHolder, getLockOwner, getProposalDate, getWorkflowId, isLocked, lock, remove, setCreationDate, setCreator, setCurrentStepId, setDCContributor, setDCCoverage, setDCCreator, setDCDate, setDCDescription, setDCFormat, setDCIdentifier, setDCLanguage, setDCPublisher, setDCRelation, setDCRights, setDCSource, setDCSubject, setDCTitle, setDCType, setFirstValidationDate, setLastContributor, setLastMajorValidationDate, setLastModified, setLastValidationDate, setOutgoingReferences, setProposalDate, setTitle, setTitle, setWorkflowId, tag, unlock, untag
-
Methods inherited from class org.ametys.cms.repository.DefaultContent
addReaction, addReport, clearReports, copyTo, copyTo, copyTo, copyTo, copyTo, createChild, getChild, getChildren, getCreationDate, getCreator, getDCContributor, getDCCoverage, getDCCreator, getDCDate, getDCDescription, getDCFormat, getDCIdentifier, getDCLanguage, getDCPublisher, getDCRelation, getDCRights, getDCSource, getDCSubject, getDCTitle, getDCType, getFirstValidationDate, getInternalDataHolder, getLanguage, getLastContributor, getLastMajorValidationDate, getLastModified, getLastValidationDate, getMixinTypes, getOutgoingReferences, getReactionUsers, getReferencingContents, getReportsCount, getRootAttachments, getTags, getTitle, getTitle, getTypes, hasChild, hasReferencingContents, removeReaction, setLanguage, setMixinTypes, setReportsCount, setType, setTypes, toSAX
-
Methods inherited from class org.ametys.plugins.repository.jcr.DefaultAmetysObject
addAllowedGroups, addAllowedProfilesForAnonymous, addAllowedProfilesForAnyConnectedUser, addAllowedUsers, addDeniedGroups, addDeniedProfilesForAnonymous, addDeniedProfilesForAnyConnectedUser, addDeniedUsers, addLabel, checkpoint, copyNode, disallowInheritance, getAllLabels, getAllRevisions, getBaseNode, getBaseVersion, getLabels, getLabels, getNode, getProfilesForAnonymousAndAnyConnectedUser, getProfilesForGroups, getProfilesForUsers, getRevision, getRevisionTimestamp, getRevisionTimestamp, getUnversionedDataHolder, getVersionHistory, isInheritanceDisallowed, removeAllowedGroups, removeAllowedGroups, removeAllowedProfilesForAnonymous, removeAllowedProfilesForAnyConnectedUser, removeAllowedUsers, removeAllowedUsers, removeDeniedGroups, removeDeniedGroups, removeDeniedProfilesForAnonymous, removeDeniedProfilesForAnyConnectedUser, removeDeniedUsers, removeDeniedUsers, removeLabel, restoreFromLabel, restoreFromNode, restoreFromRevision, switchToLabel, switchToRevision
-
Methods inherited from class org.ametys.plugins.repository.jcr.SimpleAmetysObject
_getFactory, _invalidateName, _invalidateParentPath, getId, getMetadataHolder, getName, getParent, getParentPath, getPath, needsSave, 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.ACLAmetysObject
getProfilesForAnonymousAndAnyConnectedUser, getProfilesForGroups, getProfilesForUsers, isInheritanceDisallowed
-
Methods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, getId, getName, getParent, getParentPath, getPath, hashCode
-
Methods inherited from interface org.ametys.cms.repository.Content
getCreationDate, getCreator, getFirstValidationDate, getInternalDataHolder, getLanguage, getLastContributor, getLastMajorValidationDate, getLastModified, getLastValidationDate, getMixinTypes, getOutgoingReferences, getReferencingContents, getRootAttachments, getTitle, getTitle, getTypes, hasReferencingContents, setLanguage, setMixinTypes, setType, setTypes, toSAX
-
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.DataAwareAmetysObject
copyTo, dataToSAX, dataToSAX
-
Methods inherited from interface org.ametys.plugins.repository.dublincore.DublinCoreAwareAmetysObject
getDCContributor, getDCCoverage, getDCCreator, getDCDate, getDCDescription, getDCFormat, getDCIdentifier, getDCLanguage, getDCPublisher, getDCRelation, getDCRights, getDCSource, getDCSubject, getDCTitle, getDCType
-
Methods inherited from interface org.ametys.plugins.repository.jcr.JCRAmetysObject
getNode
-
Methods inherited from interface org.ametys.plugins.repository.data.ametysobject.ModelAwareDataAwareAmetysObject
getComments, getDataNames, getDefinition, getExternalValue, getLocalValue, getModel, getStatus, getValue, getValue, hasComments, hasDefinition, hasExternalValue, hasExternalValueOrEmpty, hasLocalValue, hasLocalValueOrEmpty, hasValue, hasValueOrEmpty
-
Methods inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
commentsToSAX, dataToMap, dataToMap, dataToMap, dataToMap, dataToSAX, dataToSAX, dataToSAX, dataToSAX, dataToSAXForEdition, getDataNames, getType, getValue, hasValue, hasValueOrEmpty, isMultiple
-
Methods inherited from interface org.ametys.plugins.repository.ModifiableACLAmetysObject
addAllowedGroups, addAllowedProfilesForAnonymous, addAllowedProfilesForAnyConnectedUser, addAllowedUsers, addDeniedGroups, addDeniedProfilesForAnonymous, addDeniedProfilesForAnyConnectedUser, addDeniedUsers, disallowInheritance, removeAllowedGroups, removeAllowedGroups, removeAllowedProfilesForAnonymous, removeAllowedProfilesForAnyConnectedUser, removeAllowedUsers, removeAllowedUsers, removeDeniedGroups, removeDeniedGroups, removeDeniedProfilesForAnonymous, removeDeniedProfilesForAnyConnectedUser, removeDeniedUsers, removeDeniedUsers
-
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.ModifiableModelAwareDataAwareAmetysObject
getComposite, getComposite, getExternalComposite, getExternalComposite, getExternalRepeater, getExternalRepeater, getLocalComposite, getLocalComposite, getLocalRepeater, getLocalRepeater, getParentDataHolder, getRepeater, getRepeater, getRepositoryData, getRootDataHolder, removeExternalizableMetadataIfExists, removeExternalValue, removeLocalValue, removeValue, setComments, setExternalValue, setLocalValue, setStatus, setValue, synchronizeValues, synchronizeValues, synchronizeValues, synchronizeValues
-
Methods inherited from interface org.ametys.plugins.repository.tag.TagAwareAmetysObject
getTags
-
Methods inherited from interface org.ametys.plugins.repository.TraversableAmetysObject
getChildAt, getChildPosition
-
-
-
-
Field Detail
-
CATALOG
public static final String CATALOG
The attribute holding the catalog- See Also:
- Constant Field Values
-
CODE
public static final String CODE
The attribute holding the code- See Also:
- Constant Field Values
-
NATURE
public static final String NATURE
Constants for attribute 'nature'- See Also:
- Constant Field Values
-
NB_HOURS
public static final String NB_HOURS
Constants for attribute 'nbHours'- See Also:
- Constant Field Values
-
COURSE_HOLDER
public static final String COURSE_HOLDER
Name of attribute for course holder- See Also:
- Constant Field Values
-
PARENT_COURSES
public static final String PARENT_COURSES
Name of attribute for parent courses- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CoursePart
public CoursePart(Node node, String parentPath, CoursePartFactory factory)
Constructor.- Parameters:
node
- the JCR Node.parentPath
- the parent pathfactory
- the corresponding factory.
-
-
Method Detail
-
getCatalog
public String getCatalog()
Get the catalog.- Returns:
- the catalog
-
setCatalog
public void setCatalog(String catalog) throws AmetysRepositoryException
Set the catalog.- Parameters:
catalog
- The catalog- Throws:
AmetysRepositoryException
- if an error occurs
-
setCode
public void setCode(String code) throws AmetysRepositoryException
Set the code.- Parameters:
code
- The code- Throws:
AmetysRepositoryException
- if an error occurs
-
getNumberOfHours
public double getNumberOfHours()
Get the number of hours- Returns:
- the number of hours
-
getCourseHolder
public Course getCourseHolder()
Get the course holder- Returns:
- the course holder
-
getCourses
public List<Course> getCourses()
Get the parent courses.
-
getRootPrograms
public Set<Program> getRootPrograms()
Returns the programs holding this course part through the courses- Returns:
- the root programs
-
-