de.espirit.firstspirit.access.store.mediastore
Interface MediaFolder

All Superinterfaces:
Comparable<StoreElement>, HistoryProvider, IDProvider, Referenceable, StoreElement, StoreElementFolder, Workflowable
All Known Subinterfaces:
MediaStoreRoot

public interface MediaFolder
extends Referenceable, StoreElementFolder

This interface provides methods to handle the MediaStore-folder

Since:
3.0

Nested Class Summary
 
Nested classes/interfaces inherited from interface de.espirit.firstspirit.access.store.IDProvider
IDProvider.DependentReleaseType, IDProvider.RevertType, IDProvider.UidType
 
Nested classes/interfaces inherited from interface de.espirit.firstspirit.storage.HistoryProvider
HistoryProvider.RevisionProvider
 
Field Summary
static IDProvider.UidType UID_TYPE
          Uid type as returned by IDProvider.getUidType().
 
Fields inherited from interface de.espirit.firstspirit.access.store.IDProvider
CHANGED, NEVER_RELEASED, RELEASED
 
Fields inherited from interface de.espirit.firstspirit.access.store.StoreElement
RELEASE_REQUESTED
 
Fields inherited from interface de.espirit.firstspirit.storage.HistoryProvider
ALL_REVISIONS, EVER_SINCE
 
Method Summary
 Media createMedia(String uidSuggestion, String filename, int type, boolean languageDependent)
          Create a new media in the current MediaStore-folder
 Media createMedia(String uidSuggestion, String filename, int type, boolean languageDependent, boolean unifyIdentifierOnServer)
          Create a new media in this mediafolder
 Media createMedia(String uidSuggestion, String filename, int type, boolean languageDependent, Map<Language,String> lang2DisplayName, boolean unifyIdentifierOnServer)
          Create a new media in this mediafolder
 MediaFolder createMediaFolder(String uid)
          Create a new MediaStore-folder in the MediaStore and unifies the uid if necessary.
 MediaFolder createMediaFolder(String uid, boolean unifyIdentifierOnServer)
          Create a new MediaFolder as child of this media folder.
 MediaFolder createMediaFolder(String uid, Map<Language,String> lang2DisplayName, boolean unifyIdentifierOnServer)
          Create a new MediaFolder as child of this media folder.
 boolean getCopyAllMedia()
          Deprecated. since 4.2.29 - use a generate task which specifies this folder as startnode
 String getName()
          Deprecated. since 4.1.10 - use IDProvider.getUid()
 void releaseAllChilds()
          Deprecated. since 4.0.17 - use IDProvider.release() or IDProvider.release(true)
 void setCopyAllMedia(boolean copyAllMedia)
          Deprecated. since 4.2.29 - use a generate task which specifies this folder as startnode
 void setName(String name)
          Deprecated. since 4.1.10 - use IDProvider.setUid(String)
 
Methods inherited from interface de.espirit.firstspirit.access.store.Referenceable
getReferenceName
 
Methods inherited from interface de.espirit.firstspirit.access.store.IDProvider
clone, contrastWith, getDisplayName, getId, getID, getInRevision, getLanguageInfo, getLongID, getMeta, getMetaFormData, getParent, getReleasedBy, getReleaseRevision, getReleaseStatus, getRevision, getUid, getUidType, hasMeta, hasUid, isInReleaseStore, isReleaseSupported, moveChild, moveChild, release, release, revert, setMeta, setMetaFormData, setUid
 
Methods inherited from interface de.espirit.firstspirit.access.store.StoreElement
appendChild, appendChildBefore, delete, exportStoreElement, getAllChilds, getAllFilteredChilds, getChildByName, getChildCount, getChildIndex, getChildren, getChildren, getChildren, getChildren, getChilds, getChilds, getCreateWorkflowPermission, getDefinedPrincipalPermissions, getDisplayName, getEditor, getElementType, getFilteredChilds, getFirstChild, getIncomingReferences, getInheritedPrincipalPermissions, getLastChanged, getLock, getMetaXml, getNextSibling, getOutgoingReferences, getPermission, getPermission, getPermission, getProject, getReferences, getSortedChilds, getStore, getTreePermission, getWorkflowPermission, getWorkflowPermissions, getWriteLock, hasIncomingReferences, hasMetaXml, 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, setMetaXml, setPermission, setPermission, setPermission, setWorkflowPermission, setWorkflowPermissions, setWriteLock, toXml, toXml, toXml, unrelease, unrelease, update
 
Methods inherited from interface de.espirit.firstspirit.access.Workflowable
getColor, getTask, hasTask, removeTask, setColor, setTask
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface de.espirit.firstspirit.storage.HistoryProvider
asRevisionProvider, getHistory, getHistory
 

Field Detail

UID_TYPE

static final IDProvider.UidType UID_TYPE
Uid type as returned by IDProvider.getUidType().

Since:
4.0.90
Method Detail

createMediaFolder

MediaFolder createMediaFolder(String uid)
                              throws LockException,
                                     ElementDeletedException
Create a new MediaStore-folder in the MediaStore and unifies the uid if necessary. Calls createMediaFolder 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 session
ElementDeletedException
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 if uniqueIdentifier == true
unifyIdentifierOnServer - use true to unify unique identifier by the server if neccessary
Returns:
the new media folder
Throws:
LockException - if this folder is locked in another session
DuplicateReferenceNameException - if uniqueIdentifier == false and a media folder with the same unique 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,
                                     ElementDeletedException
Create a new MediaFolder as child of this media folder.
The given uid is used as suggestion. If unifyNameOnServer == true the given uid will be unified on server if necessary, otherwise a DuplicateReferenceNameException will be thrown, if a mediafolder with the given uid already exists on the server.

Parameters:
uid - the unique identifier, used as suggestion if uniqueIdentifier == true
lang2DisplayName - mapping of language to language specific displayname; used to create LanguageInfo nodes
unifyIdentifierOnServer - use true to unify unique identifier by the server if neccessary
Returns:
the new media folder
Throws:
LockException - if this folder is locked in another session
DuplicateReferenceNameException - if uniqueIdentifier == false and a media folder with the same unique 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 if uniqueIdentifier == true
filename - filename of the new media
type - 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 this IDProvider.getUid() already exists on the server
LockException - if this folder is locked in another session
ElementDeletedException - 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 this mediafolder

Parameters:
uidSuggestion - the unique identifier, used as suggestion if uniqueIdentifier == true
filename - filename of the new media
type - type e.g. Media.FILE, Media.PICTURE
languageDependent - flag if new media should be a languagedependent (true media, or not (false).
unifyIdentifierOnServer - use true 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 and unifyIdentifierOnServer == false
LockException - if this folder is locked in another session
ElementDeletedException - 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,
                         ElementDeletedException
Create a new media in this mediafolder

Parameters:
uidSuggestion - the unique identifier, used as suggestion if uniqueIdentifier == true
filename - filename of the new media
type - 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 create LanguageInfo nodes
unifyIdentifierOnServer - use true 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 and unifyIdentifierOnServer == false
LockException - if this folder is locked in another session
ElementDeletedException - if this media folder is already deleted on the server
Since:
4.0.38

getName

@NotNull
@Deprecated
String getName()
Deprecated. since 4.1.10 - use IDProvider.getUid()

Get the unique name of the current MediaStore-folder

Specified by:
getName in interface StoreElement
Returns:
unique name of the MediaStore-folder
Since:
3.0

setName

@Deprecated
void setName(String name)
Deprecated. since 4.1.10 - use IDProvider.setUid(String)

Set the name of the current MediaStore-folder

Parameters:
name - new name of the MediaStore-folder
Since:
3.0

setCopyAllMedia

@Deprecated
void setCopyAllMedia(boolean copyAllMedia)
Deprecated. since 4.2.29 - use a generate task which specifies this folder as startnode

Calling has no effect

Since:
3.1.324

getCopyAllMedia

@Deprecated
boolean getCopyAllMedia()
Deprecated. since 4.2.29 - use a generate task which specifies this folder as startnode

Returns:
always false
Since:
3.1.324

releaseAllChilds

@Deprecated
void releaseAllChilds()
Deprecated. since 4.0.17 - use IDProvider.release() or IDProvider.release(true)

Since:
3.1


Copyright © 2012 e-Spirit AG. All Rights Reserved. Build 4.2.480