public class Media extends GeneratedMedia
GenericItem.GenericItemImplLocalizableItem.LocalizableItemImplExtensibleItem.ExtensibleItemImplItem.AttributeFilter, Item.AttributeMode, Item.CachedGetter, Item.CachedSetter, Item.ItemAttributeMap, Item.ItemConstraint, Item.ItemImpl, Item.JaloCachedComputationException| Modifier and Type | Field and Description |
|---|---|
static String |
FROM_JAR
Deprecated.
use
DefaultMediaService.FROM_JAR instead. |
static String |
HASDATA
Constant identifier for
hasdata attribute of Media type. |
static String |
ISONSERVER
Constant identifier for
isonserver attribute of Media type. |
static String |
PICTURE
Deprecated.
|
static String |
THUMBNAIL
Deprecated.
|
static String |
URL |
static String |
URL2
Constant identifier for
url2 attribute of Media type. |
ALTTEXT, CODE, DEFAULT_INITIAL_ATTRIBUTES, DERIVEDMEDIAS, DERIVEDMEDIASHANDLER, DESCRIPTION, FOLDER, INTERNALURL, MEDIACONTAINER, MEDIACONTAINERHANDLER, MEDIAFORMAT, REMOVABLE, SUBFOLDERPATHDATAPK, LOCATION, LOCATIONHASH, MIME, REALFILENAME, SIZELANGUAGE_FALLBACK_ENABLED_CREATION_TIME_INTERNAL, _MODIFIED_TIME_INTERNAL, accessorLog, CREATION_TIME, DISABLE_ATTRIBUTE_CHECK, DISABLE_ITEMCHECK_BEFORE_REMOVABLE, EVEN, FEATURE_ACCESSMAP_QUALIFIER, INITIAL_CREATION_FLAG, isJaloOnly, MODIFIED_TIME, NEGATIVE, NOT_FOUND, OWNER, PK, POSITIVE, SAVE_FROM_SERVICE_LAYER, staticTransientObjects, TYPEimpl, tenant| Constructor and Description |
|---|
Media() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkRemovable(SessionContext ctx)
Checks whether or not this it may be removed or not.
|
protected File |
copyToTempFile(InputStream inputStream) |
protected Item |
createItem(SessionContext ctx,
ComposedType type,
Item.ItemAttributeMap allAttributes)
Has to be implemented for each concrete subtype of item.
|
byte[] |
getData()
Deprecated.
use
de.hybris.platform.servicelayer.media.MediaService#getDataFromMedia(de.hybris.platform.core.model.media
.MediaModel)
instead. |
InputStream |
getDataFromInputStream()
Deprecated.
use
de.hybris.platform.servicelayer.media.MediaService#getStreamFromMedia(de.hybris.platform.core.model
.media.MediaModel)
instead |
InputStream |
getDataFromInputStreamSure()
Deprecated.
use
de.hybris.platform.servicelayer.media.MediaService#getStreamFromMedia(de.hybris.platform.core.model
.media.MediaModel)
instead |
DataInputStream |
getDataFromStream()
Deprecated.
use
de.hybris.platform.servicelayer.media.MediaService#getStreamFromMedia(de.hybris.platform.core.model
.media.MediaModel)
instead |
DataInputStream |
getDataFromStreamSure()
Deprecated.
use
de.hybris.platform.servicelayer.media.MediaService#getStreamFromMedia(de.hybris.platform.core.model
.media.MediaModel)
instead. |
Collection<Principal> |
getDeniedPrincipals() |
Collection<Principal> |
getDeniedPrincipals(SessionContext ctx) |
String |
getDownloadURL() |
String |
getDownloadURL(SessionContext ctx)
The URL for use in jsp pages in order to download this medias raw data file (image etc).
|
File |
getFile() |
protected String |
getFileExtensionFromMime() |
String |
getFileName()
Gives name of uploaded file.
|
String |
getFileNameForFileBasedSoftware()
Returns <dataPk>.<mime> if the media has data, else it returns the url part without server/port (and
without the 'fromjar/' which is used when loading files from jars), e.g.
|
Collection |
getFiles()
Deprecated.
use
de.hybris.platform.servicelayer.media.MediaService#getFiles(de.hybris.platform.core.model.media
.MediaModel)
instead. |
MediaFolder |
getFolder(SessionContext ctx)
Generated method - Getter of the
Media.folder attribute. |
Media |
getForContext(MediaContext context)
Deprecated.
use
de.hybris.platform.servicelayer.media.MediaService#getMediaByContext(de.hybris.platform.core.model
.media.MediaModel, de.hybris.platform.core.model.media.MediaContextModel)
instead. |
Collection<Media> |
getForeignDataOwners() |
Collection<Media> |
getForeignDataOwners(SessionContext ctx)
Gets all medias excluding this one referencing data file of this media.
|
Media |
getInFormat(MediaFormat format)
Deprecated.
use
de.hybris.platform.servicelayer.media.MediaService#getMediaByFormat(de.hybris.platform.core.model.media
.MediaModel, de.hybris.platform.core.model.media.MediaFormatModel)
instead. |
String |
getLocation(SessionContext ctx)
Generated method - Getter of the
AbstractMedia.location attribute. |
Collection<Principal> |
getPermittedPrincipals() |
Collection<Principal> |
getPermittedPrincipals(SessionContext ctx) |
String |
getURL() |
String |
getURL(SessionContext ctx)
The URL for use in jsp pages in order to view this medias raw data file (image etc).
|
String |
getURL2()
Deprecated.
use
getURL() instead |
String |
getURL2(SessionContext ctx)
Deprecated.
use
getURL(SessionContext) instead |
List<ZipEntry> |
getZipEntries()
Deprecated.
don't use any more - use
getZipEntryNames() instead |
List<String> |
getZipEntryNames()
If the media is of type ZIP-archive, then it gets all entry names of the archive.
|
boolean |
hasData()
Checks whether a data file is assigned to this media.
|
boolean |
hasForeignDataOwners()
Tells if there are other medias referencing the data file of this media.
|
boolean |
isOnServer()
Deprecated.
use
hasData() instead |
boolean |
isRemovableAsPrimitive(SessionContext context)
Checks whether the media can be removed or is locked by a job.
|
void |
moveData(Media destin)
Deprecated.
use
de.hybris.platform.servicelayer.media.MediaService#moveData(de.hybris.platform.core.model.media
.MediaModel, de.hybris.platform.core.model.media.MediaModel)
instead. |
void |
moveDataTo(Media destin)
Deprecated.
use
de.hybris.platform.servicelayer.media.MediaService#moveData(de.hybris.platform.core.model.media
.MediaModel, de.hybris.platform.core.model.media.MediaModel)
instead. |
boolean |
moveMedia(MediaFolder newFolder)
Deprecated.
use
de.hybris.platform.servicelayer.media.MediaService#setFolderForMedia(de.hybris.platform.core.model.media
.MediaModel, de.hybris.platform.core.model.media.MediaFolderModel)
instead. |
protected boolean |
moveMedia(MediaFolder newFolder,
boolean forOverwriting)
|
boolean |
relocateData(MediaFolder folder)
Deprecated.
|
void |
remove(SessionContext context)
Removes this item.
|
void |
removeData(boolean failOnError)
Removes related data and clears all metadata informations.
|
void |
setData(byte[] data)
Deprecated.
use
de.hybris.platform.servicelayer.media.MediaService#setDataForMedia(de.hybris.platform.core.model.media
.MediaModel, byte[])
instead. |
void |
setData(DataInputStream stream)
Deprecated.
use
de.hybris.platform.servicelayer.media.MediaService#setStreamForMedia(de.hybris.platform.core.model.media
.MediaModel, InputStream)
instead |
void |
setData(DataInputStream stream,
String originalName,
String mimeType)
Deprecated.
|
void |
setData(DataInputStream stream,
String originalName,
String mimeType,
MediaFolder folder)
Deprecated.
|
void |
setData(InputStream stream)
Deprecated.
use
de.hybris.platform.servicelayer.media.MediaService#setStreamForMedia(de.hybris.platform.core.model.media
.MediaModel, InputStream)
instead |
void |
setData(InputStream stream,
String originalName,
String mimeType)
Sets given data to media by writing content of given stream to a new data file.
|
void |
setData(InputStream stream,
String originalName,
String mimeType,
MediaFolder folder)
Sets given data to media by writing content of given stream to a new data file.
|
void |
setData(Media sourceMedia)
Deprecated.
use
de.hybris.platform.servicelayer.media.MediaService#copyData(de.hybris.platform.core.model.media
.MediaModel, de.hybris.platform.core.model.media.MediaModel)
instead. |
void |
setDataByURL()
Loads the data from the medias URL.
|
void |
setDataFromStream(DataInputStream stream)
Deprecated.
use
de.hybris.platform.servicelayer.media.MediaService#setStreamForMedia(de.hybris.platform.core.model.media
.MediaModel, InputStream)
instead |
void |
setDataFromStream(InputStream stream)
Deprecated.
use
de.hybris.platform.servicelayer.media.MediaService#setStreamForMedia(de.hybris.platform.core.model.media
.MediaModel, InputStream)
instead |
void |
setDataPK(Long dataPK)
Generated method - Setter of the
AbstractMedia.dataPK attribute. |
void |
setDeniedPrincipals(Collection<Principal> value) |
void |
setDeniedPrincipals(SessionContext ctx,
Collection<Principal> value) |
boolean |
setFile(File file)
Uploads a file for this media.
|
boolean |
setFile(File file,
MediaFolder newFolder)
Uploads a file for this media.
|
void |
setPermittedPrincipals(Collection<Principal> value) |
void |
setPermittedPrincipals(SessionContext ctx,
Collection<Principal> value) |
void |
setSize(Long size)
Generated method - Setter of the
AbstractMedia.size attribute. |
void |
setURL(SessionContext ctx,
String url)
Sets a custom URL for this media.
|
void |
setURL(String url) |
void |
setURL2(SessionContext ctx,
String url)
Deprecated.
|
void |
setURL2(String url)
Deprecated.
|
String |
toString()
Returns the
String representation of this item. |
addToDerivedMedias, addToDerivedMedias, getAltText, getAltText, getCode, getCode, getDefaultAttributeModes, getDerivedMedias, getDerivedMedias, getDescription, getDescription, getFolder, getInternalURL, getInternalURL, getMediaContainer, getMediaContainer, getMediaFormat, getMediaFormat, getSubFolderPath, getSubFolderPath, isRemovable, isRemovable, isRemovableAsPrimitive, removeFromDerivedMedias, removeFromDerivedMedias, setAltText, setAltText, setCode, setCode, setDerivedMedias, setDerivedMedias, setDescription, setDescription, setFolder, setFolder, setInternalURL, setInternalURL, setMediaContainer, setMediaContainer, setMediaFormat, setMediaFormat, setRemovable, setRemovable, setRemovable, setRemovable, setSubFolderPath, setSubFolderPathgetDataPK, getDataPK, getDataPKAsPrimitive, getDataPKAsPrimitive, getLocation, getLocationHash, getLocationHash, getMime, getMime, getRealFileName, getRealFileName, getSize, getSize, getSizeAsPrimitive, getSizeAsPrimitive, setDataPK, setDataPK, setDataPK, setLocation, setLocation, setLocationHash, setLocationHash, setMime, setMime, setRealFileName, setRealFileName, setSize, setSize, setSizegetInitialProperties, getNonInitialAttributesgetAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllLocalizedProperties, getAllValuesSessionContext, getLocalizedProperty, getLocalizedProperty, getLocalizedPropertyInternal, getLocalizedPropertyNames, getLocalizedPropertyNames, hasLanguage, isEmptyValue, isFallbackEnabled, removeLocalizedProperty, removeLocalizedProperty, setAllLocalizedProperties, setAllLocalizedProperties, setLocalizedProperty, setLocalizedPropertycreateNonClassAccessor, getAllProperties, getAllProperties, getProperty, getProperty, getPropertyNames, getPropertyNames, removeProperty, removeProperty, setAllProperties, setAllProperties, setProperty, setPropertyaddLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addLinkedItems, addNegativePermission, addPermission, addPositivePermission, assureExtensionsLoaded, changeTypeAfterCreation, checkConstraint, checkItemPermission, checkMandatoryAttribute, checkMandatoryAttribute, checkPermission, checkPermission, clearPermission, compareTo, ctx, doAfterRemove, doBeforeRemove, equals, getAccessorFor, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributes, getAllAttributesInternal, getAllLinkedItems, getAndCheckCacheBoundItem, getAttribute, getAttribute, getCacheBoundItem, getComposedType, getComposedTypePK, getCreationTime, getCurrentlyRemovingCount, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItems, getLinkedItemsCount, getLinkedItemsCount, getLinkedItemsCount, getModificationTime, getNegativePermissions, getOwner, getPermissionMap, getPermissions, getPersistenceVersion, getPK, getPositivePermissions, getRestrictedPrincipals, getSession, getSyncObject, getTenant, getTransientObject, getTransientObjectMap, hashCode, hasRegisteredClassAccessorFor, internal_registerClassAccessorFor, internal_registerNonClassAccessorFor, invalidateLocalCaches, isAlive, isCacheBound, isCurrentlyRemoving, isCurrentlyRemoving, isEmptyRelationValue, isInCreate, isInstanceOf, isItemCheckBeforeRemoveableDisabled, isRelationLocalizationFallbackEnabled, newInstance, notifyExtensionsAfterItemCreation, notifyExtensionsBeforeItemCreation, notifyItemRemoval, readResolve, refreshRemote, registerAccessFor, registerAccessFor, registerJaloInvalidationListeners, remove, removeItemCollection, removeItemCollection, removeLinkedItems, removeLinkedItems, removeLinkedItems, removeLinkedItems, removeLinks, removePartOfItems, removePartOfItems, setAllAttributes, setAllAttributes, setAllAttributesInternal, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAllLinkedItems, setAttribute, setAttribute, setAttributeFromString, setAttributeFromString, setCacheBound, setComposedType, setCreationTime, setImplementation, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setLinkedItems, setModificationTime, setNonInitialAttributes, setOwner, setPermissionsByMap, setTransientObject, setUseTA, useTA, writeReplacegetImplementation, setTenantpublic static final String URL
@Deprecated public static final String FROM_JAR
DefaultMediaService.FROM_JAR instead.@Deprecated public static final String THUMBNAIL
@Deprecated public static final String PICTURE
public static final String URL2
url2 attribute of Media type.public static final String HASDATA
hasdata attribute of Media type.public static final String ISONSERVER
isonserver attribute of Media type.protected Item createItem(SessionContext ctx, ComposedType type, Item.ItemAttributeMap allAttributes) throws JaloBusinessException
ItemComposedType.newInstance(Map).
In case this method uses any of the attribute values during creation it is required to override
Item.getNonInitialAttributes(SessionContext, ItemAttributeMap) too.
Sn example:
public static final String MY_ATTRIBUTE = "someAttribute"; ... protected Item createItem(SessionContext
ctx, ComposedType type, Map allAttributes ) throws JaloBusinessException { MyManager man = ... return
man.createMyItem( (String)allAttributes.get(MY_ATTRIBUTE) );
// here MY_ATTRIBUTE is used for creation, so it must not be set again } protected Map getNonInitialAttributes(
SessionContext ctx, Map allAttributes ) { // let superclass remove its own initial attributes Map ret =
super.getNonInitialAttributes( ctx, allAttributes );
// remove MY_ATTRIBUTE from all attributes since if has already been set ret.remove(MY_ATTRIBUTE); return ret; }
createItem in class GeneratedMediactx - the current session context which this item is created withintype - the actual item type ( since subtypes may not provide a own jalo class this may be different from the
type which this method was implemented for )JaloBusinessException - indicates an error during creation - any changes will be rollbackedpublic boolean setFile(File file) throws JaloBusinessException
file - the file to upload (must be readable!)JaloBusinessExceptionpublic boolean setFile(File file, MediaFolder newFolder) throws JaloBusinessException
file - the file to upload (must be readable!)newFolder - the new folder for this media where the new file will be located atJaloBusinessExceptionpublic String getURL()
public String getURL(SessionContext ctx)
setData(byte[]) was called a automatically generated URL will be returned which points to the
uploaded file@Deprecated public String getURL2(SessionContext ctx)
getURL(SessionContext) instead@Deprecated public String getURL2()
getURL() instead@Deprecated public void setURL2(SessionContext ctx, String url) throws JaloBusinessException
JaloBusinessException@Deprecated public void setURL2(String url) throws JaloBusinessException
JaloBusinessExceptionpublic String getDownloadURL(SessionContext ctx)
GeneratedMedia.getInternalURL() URL()} will expanded by:
GeneratedAbstractMedia.getMime() ]&realname=[return value of
GeneratedAbstractMedia.getRealFileName()]GeneratedAbstractMedia.getRealFileName()]GeneratedAbstractMedia.getMime()]GeneratedMedia.getInternalURL() call will be
returned directlypublic String getDownloadURL()
protected File copyToTempFile(InputStream inputStream) throws IOException
IOException@Deprecated public boolean relocateData(MediaFolder folder)
folder - the folder to which move data file@Deprecated public void setData(DataInputStream stream)
de.hybris.platform.servicelayer.media.MediaService#setStreamForMedia(de.hybris.platform.core.model.media
.MediaModel, InputStream)
insteadstream - stream whose content will be set as data to media@Deprecated public final void setData(DataInputStream stream, String originalName, String mimeType)
stream - stream whose content will be set as data to mediaoriginalName - original name of the datamimeType - mime type of datapublic final void setData(InputStream stream, String originalName, String mimeType)
stream - stream whose content will be set as data to mediaoriginalName - original name of the datamimeType - mime type of data@Deprecated public void setData(DataInputStream stream, String originalName, String mimeType, MediaFolder folder)
stream - stream whose content will be set as data to mediaoriginalName - original name of the datamimeType - mime type of datafolder - folder where the data will be written to@Deprecated public void setData(InputStream stream)
de.hybris.platform.servicelayer.media.MediaService#setStreamForMedia(de.hybris.platform.core.model.media
.MediaModel, InputStream)
insteadstream - stream whose content will be set as data to mediapublic void setData(InputStream stream, String originalName, String mimeType, MediaFolder folder)
stream - stream whose content will be set as data to mediaoriginalName - original name of the datamimeType - mime type of datafolder - folder where the data will be written topublic void setURL(String url) throws JaloBusinessException
JaloBusinessExceptionpublic void setURL(SessionContext ctx, String url) throws JaloBusinessException
JaloBusinessExceptionpublic boolean hasData()
@Deprecated public boolean isOnServer()
hasData() insteadpublic void setSize(Long size)
GeneratedAbstractMediaAbstractMedia.size attribute.setSize in class GeneratedAbstractMediasize - the size - Size of referenced data file.public boolean isRemovableAsPrimitive(SessionContext context)
ConsistencyCheckException will be raised while call of remove.
Change default null handlingisRemovableAsPrimitive in class GeneratedMediaprotected void checkRemovable(SessionContext ctx) throws ConsistencyCheckException
ItemcheckRemovable in class ItemConsistencyCheckException - to indicate that the item cannot be removedpublic void remove(SessionContext context) throws ConsistencyCheckException
Item
This method is using the following attributes of the given SessionContext:
| CacheUsage | Language | StagingMethod | ||
|---|---|---|---|---|
| n/a (this is a setter method) | no, language doesn't matter for removal | yes if called on a StageableItem, no otherwise |
remove in class Itemcontext - A SessionContext objectConsistencyCheckException - if this item could not be removed for some reasonpublic void setDataByURL()
throws IOException,
JaloBusinessException
JaloSystemException - if the media has already data (hasData()).IOExceptionJaloBusinessExceptionpublic void removeData(boolean failOnError)
throws JaloBusinessException
JaloBusinessException - if exception occurs and failOnError flag is setpublic Collection<Media> getForeignDataOwners()
public Collection<Media> getForeignDataOwners(SessionContext ctx)
public boolean hasForeignDataOwners()
@Deprecated public DataInputStream getDataFromStream() throws JaloBusinessException
de.hybris.platform.servicelayer.media.MediaService#getStreamFromMedia(de.hybris.platform.core.model
.media.MediaModel)
insteadJaloBusinessException - if no actual data was uploaded@Deprecated public InputStream getDataFromInputStream() throws JaloBusinessException
de.hybris.platform.servicelayer.media.MediaService#getStreamFromMedia(de.hybris.platform.core.model
.media.MediaModel)
insteadJaloBusinessException - if no actual data was uploaded@Deprecated public DataInputStream getDataFromStreamSure() throws JaloBusinessException
de.hybris.platform.servicelayer.media.MediaService#getStreamFromMedia(de.hybris.platform.core.model
.media.MediaModel)
instead.getDataFromStream() method but additionally for medias having data set
by fromjar notation (reading directly from classpath file).JaloBusinessException@Deprecated public InputStream getDataFromInputStreamSure() throws JaloBusinessException
de.hybris.platform.servicelayer.media.MediaService#getStreamFromMedia(de.hybris.platform.core.model
.media.MediaModel)
insteadgetDataFromStream() method but additionally for medias having data set
by fromjar notation (reading directly from classpath file).JaloBusinessException@Deprecated public void setDataFromStream(DataInputStream stream) throws JaloBusinessException
de.hybris.platform.servicelayer.media.MediaService#setStreamForMedia(de.hybris.platform.core.model.media
.MediaModel, InputStream)
insteadnull.JaloBusinessException@Deprecated public void setDataFromStream(InputStream stream) throws JaloBusinessException
de.hybris.platform.servicelayer.media.MediaService#setStreamForMedia(de.hybris.platform.core.model.media
.MediaModel, InputStream)
insteadnull.JaloBusinessException@Deprecated public byte[] getData() throws JaloBusinessException
de.hybris.platform.servicelayer.media.MediaService#getDataFromMedia(de.hybris.platform.core.model.media
.MediaModel)
instead.JaloBusinessException - if no actual data was uploaded@Deprecated public void setData(Media sourceMedia)
de.hybris.platform.servicelayer.media.MediaService#copyData(de.hybris.platform.core.model.media
.MediaModel, de.hybris.platform.core.model.media.MediaModel)
instead.setData(InputStream)! In case the
source media does not hold own data but points to a URL this media simply takes the URL - no real data is copied.sourceMedia - media which hold source dataJaloInvalidParameterException - if given media is null or does not provide any data (either by file or URL)@Deprecated public void setData(byte[] data) throws JaloBusinessException
de.hybris.platform.servicelayer.media.MediaService#setDataForMedia(de.hybris.platform.core.model.media
.MediaModel, byte[])
instead.JaloBusinessException@Deprecated public Collection getFiles() throws JaloSystemException
de.hybris.platform.servicelayer.media.MediaService#getFiles(de.hybris.platform.core.model.media
.MediaModel)
instead.File's.JaloSystemException - if no file was foundpublic File getFile() throws JaloSystemException
JaloSystemExceptionpublic String getFileName()
protected String getFileExtensionFromMime()
@Deprecated public void moveData(Media destin) throws JaloBusinessException
de.hybris.platform.servicelayer.media.MediaService#moveData(de.hybris.platform.core.model.media
.MediaModel, de.hybris.platform.core.model.media.MediaModel)
instead.destin - target media to move data toJaloBusinessException - if this media has no data@Deprecated public void moveDataTo(Media destin) throws JaloBusinessException
de.hybris.platform.servicelayer.media.MediaService#moveData(de.hybris.platform.core.model.media
.MediaModel, de.hybris.platform.core.model.media.MediaModel)
instead.destin - target media to move data toJaloSystemException - if source media has no dataJaloBusinessException@Deprecated public boolean moveMedia(MediaFolder newFolder) throws JaloBusinessException
de.hybris.platform.servicelayer.media.MediaService#setFolderForMedia(de.hybris.platform.core.model.media
.MediaModel, de.hybris.platform.core.model.media.MediaFolderModel)
instead.newFolder - folder where the data has to be moved toJaloBusinessException - in case an IOException is thrown while move@Deprecated protected boolean moveMedia(MediaFolder newFolder, boolean forOverwriting) throws JaloBusinessException
MediaService.setFolderForMedia(de.hybris.platform.core.model.media.MediaModel,
de.hybris.platform.core.model.media.MediaFolderModel)
instead.newFolder - folder where the data has to be moved toforOverwriting - special case: if data is going to be overwritten anyway we can optimize moving data a bitJaloBusinessException - in case an IOException is thrown while movepublic String getFileNameForFileBasedSoftware()
public List<String> getZipEntryNames() throws IOException, JaloBusinessException
application/zipJaloBusinessException - media is not an zip-archiveIOException - error while reading entry names from archive@Deprecated public List<ZipEntry> getZipEntries() throws IOException, JaloBusinessException
getZipEntryNames() insteadapplication/zipJaloBusinessException - media is not an zip-archiveIOException - error while reading entries from archive@Deprecated public Media getInFormat(MediaFormat format)
de.hybris.platform.servicelayer.media.MediaService#getMediaByFormat(de.hybris.platform.core.model.media
.MediaModel, de.hybris.platform.core.model.media.MediaFormatModel)
instead.MediaContainer.getMedia(MediaFormat) method of related
MediaContainer. Returns null if no MediaContainer is assigned (
GeneratedMedia.getMediaContainer() returns null) or the assigned MediaContainer does not provide a
media in given format.format - format the desired media has to havenull if no corresponding media in specified format is available@Deprecated public Media getForContext(MediaContext context)
de.hybris.platform.servicelayer.media.MediaService#getMediaByContext(de.hybris.platform.core.model
.media.MediaModel, de.hybris.platform.core.model.media.MediaContextModel)
instead.context - context which defines the target formatpublic String toString()
ItemString representation of this item. This is by default the representation of the primary
key of this item.public void setDataPK(Long dataPK)
GeneratedAbstractMediaAbstractMedia.dataPK attribute.setDataPK in class GeneratedAbstractMediadataPK - the dataPK - PK of the referenced data file.public MediaFolder getFolder(SessionContext ctx)
GeneratedMediaMedia.folder attribute.getFolder in class GeneratedMediapublic String getLocation(SessionContext ctx)
GeneratedAbstractMediaAbstractMedia.location attribute.getLocation in class GeneratedAbstractMediapublic Collection<Principal> getDeniedPrincipals()
public void setDeniedPrincipals(Collection<Principal> value)
public Collection<Principal> getDeniedPrincipals(SessionContext ctx)
public void setDeniedPrincipals(SessionContext ctx, Collection<Principal> value)
public Collection<Principal> getPermittedPrincipals()
public Collection<Principal> getPermittedPrincipals(SessionContext ctx)
public void setPermittedPrincipals(Collection<Principal> value)
public void setPermittedPrincipals(SessionContext ctx, Collection<Principal> value)
Copyright © 2017 SAP SE. All Rights Reserved.