Interface MediaFolder
- All Superinterfaces:
Comparable<StoreElement>,HistoryProvider,IDProvider,Referenceable,StoreElement,StoreElementFolder,Workflowable
- All Known Subinterfaces:
MediaStoreRoot
This interface provides methods to handle the MediaStore-folder
- Since:
- 3.0
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.espirit.firstspirit.storage.HistoryProvider
HistoryProvider.RevisionProviderNested classes/interfaces inherited from interface de.espirit.firstspirit.access.store.IDProvider
IDProvider.DependentReleaseType, IDProvider.RevertType, IDProvider.UidType -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final IDProvider.UidTypeUid type as returned byIDProvider.getUidType().Fields inherited from interface de.espirit.firstspirit.storage.HistoryProvider
ALL_REVISIONS, EVER_SINCE, UNTIL_NOWFields inherited from interface de.espirit.firstspirit.access.store.IDProvider
CHANGED, NEVER_RELEASED, RELEASED -
Method Summary
Modifier and TypeMethodDescriptioncreateMedia(String uidSuggestion, String filename, int type, boolean languageDependent) Create a new media in the current MediaStore-foldercreateMedia(String uidSuggestion, String filename, int type, boolean languageDependent, boolean unifyIdentifierOnServer) Create a new media in thismediafoldercreateMedia(String uidSuggestion, String filename, int type, boolean languageDependent, Map<Language, String> lang2DisplayName, boolean unifyIdentifierOnServer) Create a new media in thismediafoldercreateMediaFolder(String uid) Create a new MediaStore-folder in the MediaStore and unifies the uid if necessary.createMediaFolder(String uid, boolean unifyIdentifierOnServer) Create a new MediaFolder as child of this media folder.createMediaFolder(String uid, Map<Language, String> lang2DisplayName, boolean unifyIdentifierOnServer) Create a new MediaFolder as child of this media folder.
The given uid is used as suggestion.@NotNull StringgetName()Deprecated.@Nullable StringgetStoredUrl(Language language) Get the stored URL for this node and the provided language.Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface de.espirit.firstspirit.storage.HistoryProvider
asRevisionProvider, getHistory, getHistoryMethods inherited from interface de.espirit.firstspirit.access.store.IDProvider
contrastWith, getDisplayName, getId, getInRevision, getLanguageInfo, getLongID, getMeta, getMetaFormData, getParent, getReleasedBy, getReleaseRevision, getReleaseRevision, getReleaseStatus, getReleaseStatus, getRevision, getUid, getUidType, hasMeta, hasUid, isInReleaseStore, isInReleaseStore, isReachableInReleaseStore, isReleased, isReleased, isReleaseSupported, moveChild, moveChild, release, release, release, release, revert, setDisplayName, setMeta, setMetaFormData, setUidMethods inherited from interface de.espirit.firstspirit.access.store.Referenceable
getReferenceNameMethods inherited from interface de.espirit.firstspirit.access.store.StoreElement
appendChild, appendChildBefore, delete, exportStoreElement, getChildCount, getChildIndex, getChildren, getChildren, getChildren, getChildren, getCreateWorkflowPermission, getDefinedPrincipalPermissions, getEditor, getElementType, getFirstChild, getIncomingReferences, getInheritedPrincipalPermissions, getLastChanged, getNextSibling, getOutgoingReferences, getPermission, getPermission, getPermission, getPreviousSibling, getProject, getReferences, getReferences, getStore, getTreePermission, getWorkflowPermission, getWorkflowPermissions, getWriteLock, hasIncomingReferences, hasPermissions, importStoreElement, importStoreElements, inheritWorkflowPermission, isDeleted, isExportSupported, isFolder, isImportSupported, isLocked, isLockedOnServer, isLockSupported, isPermissionSupported, isWorkflowAllowed, isWorkflowSupported, refresh, removeAllWorkflowPermissions, removeChild, removePermission, removePermission, removePermission, removeWorkflowPermission, replaceChild, save, save, save, setInheritWorkflowPermission, setLock, setLock, setPermission, setPermission, setPermission, setWorkflowPermission, setWorkflowPermissions, setWriteLock, toXml, toXml, toXmlMethods inherited from interface de.espirit.firstspirit.access.Workflowable
getColor, getTask, hasTask, removeTask, setColor, setTask
-
Field Details
-
UID_TYPE
Uid type as returned byIDProvider.getUidType().- Since:
- 4.0.90
-
-
Method Details
-
createMediaFolder
Create a new MediaStore-folder in the MediaStore and unifies the uid if necessary. CallscreateMediaFolder uid, true- Parameters:
uid- unique identifier of the new media folder- Returns:
- the new media folder
- Throws:
LockException- if this folder is locked in another sessionElementDeletedException- Since:
- 3.0
-
createMediaFolder
MediaFolder createMediaFolder(String uid, boolean unifyIdentifierOnServer) throws LockException, DuplicateReferenceNameException, ElementDeletedException Create a new MediaFolder as child of this media folder.- Parameters:
uid- the unique identifier, used as suggestion ifuniqueIdentifier == trueunifyIdentifierOnServer- usetrueto unify unique identifier by the server if neccessary- Returns:
- the new media folder
- Throws:
LockException- if this folder is locked in another sessionDuplicateReferenceNameException- ifuniqueIdentifier == falseand a media folder with the sameunique identifieralready exists.ElementDeletedException- if this folder is already deleted on the server- Since:
- 4.0
-
createMediaFolder
MediaFolder createMediaFolder(String uid, Map<Language, String> lang2DisplayName, boolean unifyIdentifierOnServer) throws LockException, DuplicateReferenceNameException, ElementDeletedExceptionCreate a new MediaFolder as child of this media folder.
The given uid is used as suggestion. IfunifyNameOnServer == truethe given uid will be unified on server if necessary, otherwise aDuplicateReferenceNameExceptionwill be thrown, if a mediafolder with the given uid already exists on the server.- Parameters:
uid- the unique identifier, used as suggestion ifuniqueIdentifier == truelang2DisplayName- mapping of language to language specific displayname; used to createLanguageInfonodesunifyIdentifierOnServer- usetrueto unify unique identifier by the server if neccessary- Returns:
- the new media folder
- Throws:
LockException- if this folder is locked in another sessionDuplicateReferenceNameException- ifuniqueIdentifier == falseand a media folder with the sameunique identifieralready exists.ElementDeletedException- if this folder is already deleted on the server- Since:
- 4.2.400
-
createMedia
Media createMedia(String uidSuggestion, String filename, int type, boolean languageDependent) throws DuplicateReferenceNameException, LockException, ElementDeletedException Create a new media in the current MediaStore-folder- Parameters:
uidSuggestion- the unique identifier, used as suggestion ifuniqueIdentifier == truefilename- filename of the new mediatype- type e.g.Media.FILE,Media.PICTURElanguageDependent- flag if new media should be a languagedependent (truemedia, or not (false).- Returns:
- a new media object
- Throws:
DuplicateReferenceNameException- if a medium with thisIDProvider.getUid()already exists on the serverLockException- if this folder is locked in another sessionElementDeletedException- if this media folder is already deleted on the server- Since:
- 3.0
-
createMedia
Media createMedia(String uidSuggestion, String filename, int type, boolean languageDependent, boolean unifyIdentifierOnServer) throws LockException, DuplicateReferenceNameException, ElementDeletedException Create a new media in thismediafolder- Parameters:
uidSuggestion- the unique identifier, used as suggestion ifuniqueIdentifier == truefilename- filename of the new mediatype- type e.g.Media.FILE,Media.PICTURElanguageDependent- flag if new media should be a languagedependent (truemedia, or not (false).unifyIdentifierOnServer- usetrueto unify unique identifier by the server if neccessary- Returns:
- a new media object
- Throws:
DuplicateReferenceNameException- if a medium with the given uidSuggestion already exists on the server andunifyIdentifierOnServer == falseLockException- if this folder is locked in another sessionElementDeletedException- if this media folder is already deleted on the server- Since:
- 4.0
-
createMedia
Media createMedia(String uidSuggestion, String filename, int type, boolean languageDependent, Map<Language, String> lang2DisplayName, boolean unifyIdentifierOnServer) throws LockException, DuplicateReferenceNameException, ElementDeletedExceptionCreate a new media in thismediafolder- Parameters:
uidSuggestion- the unique identifier, used as suggestion ifuniqueIdentifier == truefilename- filename of the new mediatype- type e.g.Media.FILE,Media.PICTURElanguageDependent- flag if new media should be a languagedependent (truemedia, or not (false).lang2DisplayName- mapping of language to specific displayname; used to createLanguageInfonodesunifyIdentifierOnServer- usetrueto unify unique identifier by the server if neccessary- Returns:
- a new media object
- Throws:
DuplicateReferenceNameException- if a medium with the given uidSuggestion already exists on the server andunifyIdentifierOnServer == falseLockException- if this folder is locked in another sessionElementDeletedException- if this media folder is already deleted on the server- Since:
- 4.0.38
-
getName
Deprecated.since 4.1.10 - useIDProvider.getUid()Get the unique name of the current MediaStore-folder- Specified by:
getNamein interfaceStoreElement- Returns:
- unique name of the MediaStore-folder
- Since:
- 3.0
-
getStoredUrl
Get the stored URL for this node and the provided language.- Parameters:
language- Language to get the URL for.- Returns:
- The stored URL (absolute, without domain prefix) or
nullif no URL has been stored (yet). - Throws:
NullPointerException- if parameterlanguageisnull.- Since:
- 5.0.9
- See Also:
-
IDProvider.getUid()