Class JCRResource<F extends JCRResourceFactory>
- java.lang.Object
-
- org.ametys.plugins.repository.AbstractAmetysObject
-
- org.ametys.plugins.repository.jcr.SimpleAmetysObject<F>
-
- org.ametys.plugins.repository.jcr.DefaultAmetysObject<F>
-
- org.ametys.plugins.explorer.resources.jcr.JCRResource<F>
-
- Type Parameters:
F
- the actual type of factory.
- All Implemented Interfaces:
CommentableResource
,ModifiableResource
,Resource
,ACLAmetysObject
,AmetysObject
,CopiableAmetysObject
,DublinCoreAwareAmetysObject
,ModifiableDublinCoreAwareAmetysObject
,JCRAmetysObject
,LockableAmetysObject
,LockAwareAmetysObject
,MetadataAwareAmetysObject
,ModifiableMetadataAwareAmetysObject
,ModifiableACLAmetysObject
,ModifiableAmetysObject
,RemovableAmetysObject
,TagAwareAmetysObject
,TaggableAmetysObject
,DataAndVersionAwareAmetysObject
,ModifiableDataAwareVersionableAmetysObject
,VersionableAmetysObject
,VersionAwareAmetysObject
public class JCRResource<F extends JCRResourceFactory> extends DefaultAmetysObject<F> implements ModifiableResource, CopiableAmetysObject
Default implementation of anResource
, backed by a JCR node.
-
-
Field Summary
Fields Modifier and Type Field Description static String
CONTRIBUTOR_NODE_NAME
The name of node holding the last contributorstatic String
CREATION_DATE
Constants for lastModified Metadatastatic String
CREATOR_NODE_NAME
The name of node holding the creator-
Fields inherited from class org.ametys.plugins.repository.jcr.DefaultAmetysObject
PROTECTED_PROPERTIES
-
-
Constructor Summary
Constructors Constructor Description JCRResource(Node node, String parentPath, F factory)
Creates anJCRResource
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AmetysObject
copyTo(ModifiableTraversableAmetysObject parent, String name)
Copy the currentAmetysObject
to the given object.AmetysObject
copyTo(ModifiableTraversableAmetysObject parent, String name, List<String> restrictTo)
Copy the currentAmetysObject
to the given object if it is not in the restriction list.UserIdentity
getAuthorFromRevision(String revision)
Get the author from old revisionThread
getComments(boolean createThread)
Get the thread holding the commentsDate
getCreationDate()
Retrieves the creation date.UserIdentity
getCreator()
Returns the last contributor of this resource.String
getDCContributor()
Get the Dublin Core contributor.String
getDCCoverage()
Get the Dublin Core coverage.String
getDCCreator()
Get the Dublin Core creator.Date
getDCDate()
Get the Dublin Core date.String
getDCDescription()
Get the Dublin Core description.String
getDCFormat()
Get the Dublin Core format.String
getDCIdentifier()
Get the Dublin Core identifier.String
getDCLanguage()
Get the Dublin Core language.String
getDCPublisher()
Get the Dublin Core publisher.String
getDCRelation()
Get the Dublin Core relation.String
getDCRights()
Get the Dublin Core rights.String
getDCSource()
Get the Dublin Core source.String[]
getDCSubject()
Get the Dublin Core subject.String
getDCTitle()
Get the Dublin Core title.String
getDCType()
Get the Dublin Core type.InputStream
getInputStream()
Returns the data stream.String[]
getKeywords()
Returns the keywords of this resource, as a String array.String
getKeywordsAsString()
Returns the keywords of this resource, as a comme-separated String.UserIdentity
getLastContributor()
Retrieves the login of the last contributor.Date
getLastModified()
Returns the last modification date.long
getLength()
Returns the length of the data stream.UserIdentity
getLockOwner()
Returns the owner of the lock, or null if noneString
getMimeType()
Returns the data mime-type.String
getResourcePath()
Returns the path of this resource in its hierarchy (which is a subset of the whole repository).Set<String>
getTags()
Retrieves current tags.boolean
isLocked()
Returns true if thisAmetysObject
is lockedvoid
lock()
Locks thisAmetysObject
protected void
restoreFromNode(Node node)
Restore from a nodevoid
setCreationDate(Date creationDate)
Set the creation date if this resource.void
setCreator(UserIdentity author)
Set the creator of the resourcevoid
setData(InputStream stream, String mimeType, Date lastModified, UserIdentity author)
Set binary data.void
setDCContributor(String contributor)
Set the Dublin Core contributor.void
setDCCoverage(String coverage)
Set the Dublin Core coverage.void
setDCCreator(String creator)
Set the Dublin Core creator.void
setDCDate(Date date)
Set the Dublin Core date.void
setDCDescription(String description)
Set the Dublin Core description.void
setDCFormat(String format)
Set the Dublin Core format.void
setDCIdentifier(String identifier)
Set the Dublin Core identifier.void
setDCLanguage(String language)
Set the Dublin Core language.void
setDCPublisher(String publisher)
Set the Dublin Core publisher.void
setDCRelation(String relation)
Set the Dublin Core relation.void
setDCRights(String rights)
Set the Dublin Core rights.void
setDCSource(String source)
Set the Dublin Core source.void
setDCSubject(String[] subject)
Set the Dublin Core subject.void
setDCTitle(String title)
Set the Dublin Core title.void
setDCType(String type)
Set the Dublin Core type.void
setKeywords(String keywords)
Set this resource's keywords.void
setKeywords(String[] keywords)
Set this resource's keywords.void
setLastContributor(UserIdentity lastContributor)
Set the last contributor of the resourcevoid
setLastModified(Date lastModified)
Set the last modified date if this resource.void
setMimeType(String mimeType)
Set this resource mime type.void
tag(String tag)
Tags.void
unlock()
Unlocks thisAmetysObject
void
untag(String tag)
Untags.-
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, restoreFromRevision, switchToLabel, switchToRevision
-
Methods inherited from class org.ametys.plugins.repository.jcr.SimpleAmetysObject
_getFactory, _invalidateName, _invalidateParentPath, getId, getMetadataHolder, getName, 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.AmetysObject
equals, getId, getName, getParent, getParentPath, getPath, hashCode
-
Methods inherited from interface org.ametys.plugins.repository.ModifiableAmetysObject
needsSave, rename, revertChanges, saveChanges
-
Methods inherited from interface org.ametys.plugins.repository.RemovableAmetysObject
remove
-
-
-
-
Field Detail
-
CREATOR_NODE_NAME
public static final String CREATOR_NODE_NAME
The name of node holding the creator- See Also:
- Constant Field Values
-
CREATION_DATE
public static final String CREATION_DATE
Constants for lastModified Metadata- See Also:
- Constant Field Values
-
CONTRIBUTOR_NODE_NAME
public static final String CONTRIBUTOR_NODE_NAME
The name of node holding the last contributor- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JCRResource
public JCRResource(Node node, String parentPath, F factory)
Creates anJCRResource
.- Parameters:
node
- the node backing thisAmetysObject
parentPath
- the parentPath in the Ametys hierarchyfactory
- the DefaultAmetysObjectFactory which created the AmetysObject
-
-
Method Detail
-
setData
public void setData(InputStream stream, String mimeType, Date lastModified, UserIdentity author)
Description copied from interface:ModifiableResource
Set binary data.- Specified by:
setData
in interfaceModifiableResource
- Parameters:
stream
- TheInputStream
.mimeType
- The file mimetype.lastModified
- The date of last modification.author
- The author of last modification.
-
setLastModified
public void setLastModified(Date lastModified)
Description copied from interface:ModifiableResource
Set the last modified date if this resource.- Specified by:
setLastModified
in interfaceModifiableResource
- Parameters:
lastModified
- the last modified date.
-
setKeywords
public void setKeywords(String keywords)
Description copied from interface:ModifiableResource
Set this resource's keywords.- Specified by:
setKeywords
in interfaceModifiableResource
- Parameters:
keywords
- the comma-separated keywords.
-
setKeywords
public void setKeywords(String[] keywords)
Description copied from interface:ModifiableResource
Set this resource's keywords.- Specified by:
setKeywords
in interfaceModifiableResource
- Parameters:
keywords
- the keywords.
-
setMimeType
public void setMimeType(String mimeType)
Description copied from interface:ModifiableResource
Set this resource mime type.- Specified by:
setMimeType
in interfaceModifiableResource
- Parameters:
mimeType
- the mime type.
-
setCreator
public void setCreator(UserIdentity author)
Description copied from interface:ModifiableResource
Set the creator of the resource- Specified by:
setCreator
in interfaceModifiableResource
- Parameters:
author
- The author
-
getInputStream
public InputStream getInputStream() throws AmetysRepositoryException
Description copied from interface:Resource
Returns the data stream.- Specified by:
getInputStream
in interfaceResource
- Returns:
- the data stream.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getMimeType
public String getMimeType() throws AmetysRepositoryException
Description copied from interface:Resource
Returns the data mime-type.- Specified by:
getMimeType
in interfaceResource
- Returns:
- the data mime-type.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getLastModified
public Date getLastModified() throws AmetysRepositoryException
Description copied from interface:Resource
Returns the last modification date.- Specified by:
getLastModified
in interfaceResource
- Returns:
- the last modification date.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getLength
public long getLength() throws AmetysRepositoryException
Description copied from interface:Resource
Returns the length of the data stream.- Specified by:
getLength
in interfaceResource
- Returns:
- the length of the data stream.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getCreator
public UserIdentity getCreator() throws AmetysRepositoryException
Description copied from interface:Resource
Returns the last contributor of this resource.- Specified by:
getCreator
in interfaceResource
- Returns:
- the last contributor of this resource.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getAuthorFromRevision
public UserIdentity getAuthorFromRevision(String revision) throws RepositoryException
Get the author from old revision- Parameters:
revision
- The revision- Returns:
- The user identity of the author or
null
if not found - Throws:
RepositoryException
- If an error occurred
-
getKeywords
public String[] getKeywords() throws AmetysRepositoryException
Description copied from interface:Resource
Returns the keywords of this resource, as a String array.- Specified by:
getKeywords
in interfaceResource
- Returns:
- the keywords of this resource.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getKeywordsAsString
public String getKeywordsAsString() throws AmetysRepositoryException
Description copied from interface:Resource
Returns the keywords of this resource, as a comme-separated String.- Specified by:
getKeywordsAsString
in interfaceResource
- Returns:
- the keywords of this resource.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
restoreFromNode
protected void restoreFromNode(Node node) throws RepositoryException
Description copied from class:DefaultAmetysObject
Restore from a node- Overrides:
restoreFromNode
in classDefaultAmetysObject<F extends JCRResourceFactory>
- Parameters:
node
- The node to restore- Throws:
RepositoryException
- If error occurs
-
getResourcePath
public String getResourcePath() throws AmetysRepositoryException
Description copied from interface:Resource
Returns the path of this resource in its hierarchy (which is a subset of the whole repository).- Specified by:
getResourcePath
in interfaceResource
- Returns:
- the path of this resource in its hierarchy.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
lock
public void lock() throws AmetysRepositoryException
Description copied from interface:LockableAmetysObject
Locks thisAmetysObject
- Specified by:
lock
in interfaceLockableAmetysObject
- Throws:
AmetysRepositoryException
- if a problem occurs
-
unlock
public void unlock() throws AmetysRepositoryException
Description copied from interface:LockableAmetysObject
Unlocks thisAmetysObject
- Specified by:
unlock
in interfaceLockableAmetysObject
- Throws:
AmetysRepositoryException
- if a problem occurs
-
isLocked
public boolean isLocked() throws AmetysRepositoryException
Description copied from interface:LockAwareAmetysObject
Returns true if thisAmetysObject
is locked- Specified by:
isLocked
in interfaceLockAwareAmetysObject
- Returns:
- true if this
AmetysObject
is locked - Throws:
AmetysRepositoryException
- if a problem occurs
-
getLockOwner
public UserIdentity getLockOwner() throws AmetysRepositoryException
Description copied from interface:LockAwareAmetysObject
Returns the owner of the lock, or null if none- Specified by:
getLockOwner
in interfaceLockAwareAmetysObject
- Returns:
- the owner of the lock, or null if none
- Throws:
AmetysRepositoryException
- if a problem occurs
-
getComments
public Thread getComments(boolean createThread)
Description copied from interface:CommentableResource
Get the thread holding the comments- Specified by:
getComments
in interfaceCommentableResource
- Parameters:
createThread
- True to force the creation of the thread if it does not exists.- Returns:
- the thread holding the comments or null if the tread does not exist
-
copyTo
public AmetysObject copyTo(ModifiableTraversableAmetysObject parent, String name) throws AmetysRepositoryException
Description copied from interface:CopiableAmetysObject
Copy the currentAmetysObject
to the given object. Be careful, this method save changes.- Specified by:
copyTo
in interfaceCopiableAmetysObject
- Parameters:
parent
- The parent of the new object. Can not be null.name
- Name of the new object. Can be null. If null, the new name will be get from the copied object- Returns:
- the created object
- Throws:
AmetysRepositoryException
- if an error occurs.
-
copyTo
public AmetysObject copyTo(ModifiableTraversableAmetysObject parent, String name, List<String> restrictTo) throws AmetysRepositoryException
Description copied from interface:CopiableAmetysObject
Copy the currentAmetysObject
to the given object if it is not in the restriction list. Be careful, this method save changes.- Specified by:
copyTo
in interfaceCopiableAmetysObject
- Parameters:
parent
- The parent of the new object. Can not be null.name
- Name of the new object. Can be null. If null, the new name will be get from the copied objectrestrictTo
- A restrict list ofCopiableAmetysObject
authorized to be copied- Returns:
- the created object
- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCTitle
public String getDCTitle() throws AmetysRepositoryException
Description copied from interface:DublinCoreAwareAmetysObject
Get the Dublin Core title.- Specified by:
getDCTitle
in interfaceDublinCoreAwareAmetysObject
- Returns:
- the Dublin Core title. Can be null.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCTitle
public void setDCTitle(String title) throws AmetysRepositoryException
Description copied from interface:ModifiableDublinCoreAwareAmetysObject
Set the Dublin Core title.- Specified by:
setDCTitle
in interfaceModifiableDublinCoreAwareAmetysObject
- Parameters:
title
- the Dublin Core title to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCCreator
public String getDCCreator() throws AmetysRepositoryException
Description copied from interface:DublinCoreAwareAmetysObject
Get the Dublin Core creator.- Specified by:
getDCCreator
in interfaceDublinCoreAwareAmetysObject
- Returns:
- the Dublin Core creator. Can be null.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCCreator
public void setDCCreator(String creator) throws AmetysRepositoryException
Description copied from interface:ModifiableDublinCoreAwareAmetysObject
Set the Dublin Core creator.- Specified by:
setDCCreator
in interfaceModifiableDublinCoreAwareAmetysObject
- Parameters:
creator
- the Dublin Core creator to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCSubject
public String[] getDCSubject() throws AmetysRepositoryException
Description copied from interface:DublinCoreAwareAmetysObject
Get the Dublin Core subject.- Specified by:
getDCSubject
in interfaceDublinCoreAwareAmetysObject
- Returns:
- the Dublin Core subject. Can be null.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCSubject
public void setDCSubject(String[] subject) throws AmetysRepositoryException
Description copied from interface:ModifiableDublinCoreAwareAmetysObject
Set the Dublin Core subject.- Specified by:
setDCSubject
in interfaceModifiableDublinCoreAwareAmetysObject
- Parameters:
subject
- the Dublin Core subject to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCDescription
public String getDCDescription() throws AmetysRepositoryException
Description copied from interface:DublinCoreAwareAmetysObject
Get the Dublin Core description.- Specified by:
getDCDescription
in interfaceDublinCoreAwareAmetysObject
- Returns:
- the Dublin Core description. Can be null.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCDescription
public void setDCDescription(String description) throws AmetysRepositoryException
Description copied from interface:ModifiableDublinCoreAwareAmetysObject
Set the Dublin Core description.- Specified by:
setDCDescription
in interfaceModifiableDublinCoreAwareAmetysObject
- Parameters:
description
- the Dublin Core description to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCPublisher
public String getDCPublisher() throws AmetysRepositoryException
Description copied from interface:DublinCoreAwareAmetysObject
Get the Dublin Core publisher.- Specified by:
getDCPublisher
in interfaceDublinCoreAwareAmetysObject
- Returns:
- the Dublin Core publisher. Can be null.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCPublisher
public void setDCPublisher(String publisher) throws AmetysRepositoryException
Description copied from interface:ModifiableDublinCoreAwareAmetysObject
Set the Dublin Core publisher.- Specified by:
setDCPublisher
in interfaceModifiableDublinCoreAwareAmetysObject
- Parameters:
publisher
- the Dublin Core publisher to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCContributor
public String getDCContributor() throws AmetysRepositoryException
Description copied from interface:DublinCoreAwareAmetysObject
Get the Dublin Core contributor.- Specified by:
getDCContributor
in interfaceDublinCoreAwareAmetysObject
- Returns:
- the Dublin Core contributor. Can be null.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCContributor
public void setDCContributor(String contributor) throws AmetysRepositoryException
Description copied from interface:ModifiableDublinCoreAwareAmetysObject
Set the Dublin Core contributor.- Specified by:
setDCContributor
in interfaceModifiableDublinCoreAwareAmetysObject
- Parameters:
contributor
- the Dublin Core contributor to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCDate
public Date getDCDate() throws AmetysRepositoryException
Description copied from interface:DublinCoreAwareAmetysObject
Get the Dublin Core date.- Specified by:
getDCDate
in interfaceDublinCoreAwareAmetysObject
- Returns:
- the Dublin Core date. Can be null.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCDate
public void setDCDate(Date date) throws AmetysRepositoryException
Description copied from interface:ModifiableDublinCoreAwareAmetysObject
Set the Dublin Core date.- Specified by:
setDCDate
in interfaceModifiableDublinCoreAwareAmetysObject
- Parameters:
date
- the Dublin Core date to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCType
public String getDCType() throws AmetysRepositoryException
Description copied from interface:DublinCoreAwareAmetysObject
Get the Dublin Core type.- Specified by:
getDCType
in interfaceDublinCoreAwareAmetysObject
- Returns:
- the Dublin Core type. Can be null.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCType
public void setDCType(String type) throws AmetysRepositoryException
Description copied from interface:ModifiableDublinCoreAwareAmetysObject
Set the Dublin Core type. You can use a constant from org.ametys.plugins.repository.dublincore.DCMITypes.- Specified by:
setDCType
in interfaceModifiableDublinCoreAwareAmetysObject
- Parameters:
type
- the Dublin Core type to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCFormat
public String getDCFormat() throws AmetysRepositoryException
Description copied from interface:DublinCoreAwareAmetysObject
Get the Dublin Core format.- Specified by:
getDCFormat
in interfaceDublinCoreAwareAmetysObject
- Returns:
- the Dublin Core format. Can be null.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCFormat
public void setDCFormat(String format) throws AmetysRepositoryException
Description copied from interface:ModifiableDublinCoreAwareAmetysObject
Set the Dublin Core format.- Specified by:
setDCFormat
in interfaceModifiableDublinCoreAwareAmetysObject
- Parameters:
format
- the Dublin Core format to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCIdentifier
public String getDCIdentifier() throws AmetysRepositoryException
Description copied from interface:DublinCoreAwareAmetysObject
Get the Dublin Core identifier.- Specified by:
getDCIdentifier
in interfaceDublinCoreAwareAmetysObject
- Returns:
- the Dublin Core identifier. Can be null.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCIdentifier
public void setDCIdentifier(String identifier) throws AmetysRepositoryException
Description copied from interface:ModifiableDublinCoreAwareAmetysObject
Set the Dublin Core identifier.- Specified by:
setDCIdentifier
in interfaceModifiableDublinCoreAwareAmetysObject
- Parameters:
identifier
- the Dublin Core identifier to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCSource
public String getDCSource() throws AmetysRepositoryException
Description copied from interface:DublinCoreAwareAmetysObject
Get the Dublin Core source.- Specified by:
getDCSource
in interfaceDublinCoreAwareAmetysObject
- Returns:
- the Dublin Core source. Can be null.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCSource
public void setDCSource(String source) throws AmetysRepositoryException
Description copied from interface:ModifiableDublinCoreAwareAmetysObject
Set the Dublin Core source.- Specified by:
setDCSource
in interfaceModifiableDublinCoreAwareAmetysObject
- Parameters:
source
- the Dublin Core source to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCLanguage
public String getDCLanguage() throws AmetysRepositoryException
Description copied from interface:DublinCoreAwareAmetysObject
Get the Dublin Core language.- Specified by:
getDCLanguage
in interfaceDublinCoreAwareAmetysObject
- Returns:
- the Dublin Core language. Can be null.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCLanguage
public void setDCLanguage(String language) throws AmetysRepositoryException
Description copied from interface:ModifiableDublinCoreAwareAmetysObject
Set the Dublin Core language.- Specified by:
setDCLanguage
in interfaceModifiableDublinCoreAwareAmetysObject
- Parameters:
language
- the Dublin Core language to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCRelation
public String getDCRelation() throws AmetysRepositoryException
Description copied from interface:DublinCoreAwareAmetysObject
Get the Dublin Core relation.- Specified by:
getDCRelation
in interfaceDublinCoreAwareAmetysObject
- Returns:
- the Dublin Core relation. Can be null.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCRelation
public void setDCRelation(String relation) throws AmetysRepositoryException
Description copied from interface:ModifiableDublinCoreAwareAmetysObject
Set the Dublin Core relation.- Specified by:
setDCRelation
in interfaceModifiableDublinCoreAwareAmetysObject
- Parameters:
relation
- the Dublin Core relation to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCCoverage
public String getDCCoverage() throws AmetysRepositoryException
Description copied from interface:DublinCoreAwareAmetysObject
Get the Dublin Core coverage.- Specified by:
getDCCoverage
in interfaceDublinCoreAwareAmetysObject
- Returns:
- the Dublin Core coverage. Can be null.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCCoverage
public void setDCCoverage(String coverage) throws AmetysRepositoryException
Description copied from interface:ModifiableDublinCoreAwareAmetysObject
Set the Dublin Core coverage.- Specified by:
setDCCoverage
in interfaceModifiableDublinCoreAwareAmetysObject
- Parameters:
coverage
- the Dublin Core coverage to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
getDCRights
public String getDCRights() throws AmetysRepositoryException
Description copied from interface:DublinCoreAwareAmetysObject
Get the Dublin Core rights.- Specified by:
getDCRights
in interfaceDublinCoreAwareAmetysObject
- Returns:
- the Dublin Core rights. Can be null.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setDCRights
public void setDCRights(String rights) throws AmetysRepositoryException
Description copied from interface:ModifiableDublinCoreAwareAmetysObject
Set the Dublin Core rights.- Specified by:
setDCRights
in interfaceModifiableDublinCoreAwareAmetysObject
- Parameters:
rights
- the Dublin Core rights to set. Can be null.- Throws:
AmetysRepositoryException
- if an error occurs.
-
getCreationDate
public Date getCreationDate() throws UnknownMetadataException, AmetysRepositoryException
Description copied from interface:Resource
Retrieves the creation date.- Specified by:
getCreationDate
in interfaceResource
- Returns:
- the creation date.
- Throws:
UnknownMetadataException
- if this property does not exist.AmetysRepositoryException
- if an error occurs.
-
setCreationDate
public void setCreationDate(Date creationDate)
Description copied from interface:ModifiableResource
Set the creation date if this resource.- Specified by:
setCreationDate
in interfaceModifiableResource
- Parameters:
creationDate
- the creation date.
-
getLastContributor
public UserIdentity getLastContributor() throws UnknownMetadataException, AmetysRepositoryException
Description copied from interface:Resource
Retrieves the login of the last contributor.- Specified by:
getLastContributor
in interfaceResource
- Returns:
- the login of the last contributor.
- Throws:
UnknownMetadataException
- if this property does not exist.AmetysRepositoryException
- if an error occurs.
-
setLastContributor
public void setLastContributor(UserIdentity lastContributor)
Description copied from interface:ModifiableResource
Set the last contributor of the resource- Specified by:
setLastContributor
in interfaceModifiableResource
- Parameters:
lastContributor
- The last contributor
-
tag
public void tag(String tag) throws AmetysRepositoryException
Description copied from interface:TaggableAmetysObject
Tags.- Specified by:
tag
in interfaceTaggableAmetysObject
- Parameters:
tag
- the tag to add.- Throws:
AmetysRepositoryException
- if an error occurs.
-
untag
public void untag(String tag) throws AmetysRepositoryException
Description copied from interface:TaggableAmetysObject
Untags.- Specified by:
untag
in interfaceTaggableAmetysObject
- Parameters:
tag
- the tag to remove.- Throws:
AmetysRepositoryException
- if an error occurs.
-
getTags
public Set<String> getTags() throws AmetysRepositoryException
Description copied from interface:TagAwareAmetysObject
Retrieves current tags.- Specified by:
getTags
in interfaceTagAwareAmetysObject
- Returns:
- the current tags.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
-