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.RevisionProvider
Nested classes/interfaces inherited from interface de.espirit.firstspirit.access.store.IDProvider
IDProvider.DependentReleaseType, IDProvider.RevertType, IDProvider.UidType
-
Field Summary
Modifier and TypeFieldDescriptionstatic final IDProvider.UidType
Uid type as returned byIDProvider.getUidType()
.Fields inherited from interface de.espirit.firstspirit.storage.HistoryProvider
ALL_REVISIONS, EVER_SINCE, UNTIL_NOW
Fields 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 thismediafolder
createMedia
(String uidSuggestion, String filename, int type, boolean languageDependent, Map<Language, String> lang2DisplayName, boolean unifyIdentifierOnServer) Create a new media in thismediafolder
createMediaFolder
(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 String
getName()
Deprecated.@Nullable String
getStoredUrl
(Language language) Get the stored URL for this node and the provided language.Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface de.espirit.firstspirit.storage.HistoryProvider
asRevisionProvider, getHistory, getHistory
Methods inherited from interface de.espirit.firstspirit.access.store.IDProvider
contrastWith, getDisplayName, getId, getInRevision, getLanguageInfo, getLongID, getMeta, getMetaFormData, getParent, getReleasedBy, getReleaseRevision, getReleaseStatus, getRevision, getUid, getUidType, hasMeta, hasUid, isInReleaseStore, isReleased, isReleaseSupported, moveChild, moveChild, release, release, revert, setDisplayName, setMeta, setMetaFormData, setUid
Methods inherited from interface de.espirit.firstspirit.access.store.Referenceable
getReferenceName
Methods 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, 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, toXml
Methods 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 == true
unifyIdentifierOnServer
- usetrue
to unify unique identifier by the server if neccessary- Returns:
- the new media folder
- Throws:
LockException
- if this folder is locked in another sessionDuplicateReferenceNameException
- ifuniqueIdentifier == false
and a media folder with the sameunique identifier
already 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 == true
the given uid will be unified on server if necessary, otherwise aDuplicateReferenceNameException
will be thrown, if a mediafolder with the given uid already exists on the server.- Parameters:
uid
- the unique identifier, used as suggestion ifuniqueIdentifier == true
lang2DisplayName
- mapping of language to language specific displayname; used to createLanguageInfo
nodesunifyIdentifierOnServer
- usetrue
to unify unique identifier by the server if neccessary- Returns:
- the new media folder
- Throws:
LockException
- if this folder is locked in another sessionDuplicateReferenceNameException
- ifuniqueIdentifier == false
and a media folder with the sameunique identifier
already 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 == true
filename
- filename of the new mediatype
- type e.g.Media.FILE
,Media.PICTURE
languageDependent
- flag if new media should be a languagedependent (true
media, 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 == true
filename
- filename of the new mediatype
- type e.g.Media.FILE
,Media.PICTURE
languageDependent
- flag if new media should be a languagedependent (true
media, or not (false
).unifyIdentifierOnServer
- usetrue
to 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 == false
LockException
- 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 == true
filename
- filename of the new mediatype
- type e.g.Media.FILE
,Media.PICTURE
languageDependent
- flag if new media should be a languagedependent (true
media, or not (false
).lang2DisplayName
- mapping of language to specific displayname; used to createLanguageInfo
nodesunifyIdentifierOnServer
- usetrue
to 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 == false
LockException
- 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:
getName
in 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
null
if no URL has been stored (yet). - Throws:
NullPointerException
- if parameterlanguage
isnull
.- Since:
- 5.0.9
- See Also:
-
IDProvider.getUid()