Package com.exedio.cope.pattern
Class MediaFilter
- java.lang.Object
-
- com.exedio.cope.Feature
-
- com.exedio.cope.Pattern
-
- com.exedio.cope.pattern.MediaPath
-
- com.exedio.cope.pattern.MediaFilter
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
MediaImageioFilter
,TextUrlFilter
,TextUrlFilterDelegator
public abstract class MediaFilter extends MediaPath
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.exedio.cope.pattern.MediaPath
MediaPath.Locator, MediaPath.Log, MediaPath.NotFound
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
MediaFilter(Media source)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Date
getLastModified(Item item)
The default implementation returns null.MediaPath.Locator
getLocatorWithFallbackToSource(Item item)
Returns the same result asgetLocator
, if this filter supports filtering thesource media
for this item.Media
getSource()
abstract Set<String>
getSupportedSourceContentTypes()
String
getURLWithFallbackToSource(Item item)
Returns the same result asgetURL
, if this filter supports filtering thesource media
for this item.boolean
isFinal()
Returns, whether the contents of this media path may change or not.boolean
isMandatory()
A MediaPath is "mandatory" ifMediaPath.getContentType(Item)
andMediaPath.getLocator(Item)
will not returnnull
for any item.Condition
isNotNull()
Returns a condition matching all items, for whichMediaPath.getLocator(Item)
does not return null.Condition
isNotNull(Join join)
Returns a condition matching all items, for whichMediaPath.getLocator(Item)
does not return null.Condition
isNull()
Returns a condition matching all items, for whichMediaPath.getLocator(Item)
returns null.Condition
isNull(Join join)
Returns a condition matching all items, for whichMediaPath.getLocator(Item)
returns null.-
Methods inherited from class com.exedio.cope.pattern.MediaPath
commit, doGetAndCommit, getContentType, getExceptionLogs, getGuessedUrlLogs, getInfo, getInvalidSpecialLogs, getIsNullLogs, getLocator, getNamedURL, getNoSuchItemLogs, getNoSuchPath, getNoSuchPathLogs, getNotAnItemLogs, getNotComputableLogs, getURL, incrementDelivered, isContentTypeWrapped, isUrlFingerPrinted, isUrlGuessingPrevented, isUrlGuessingPreventedSecurely, notFoundIsNull, notFoundNotComputable, onMount
-
Methods inherited from class com.exedio.cope.Pattern
addSource, addSource, addSource, addSource, addSourceFeature, addSourceFeature, addSourceFeature, annotationField, equals, getGeneratedTypes, getSourceFeatures, getSourceFeaturesGather, getSourceFields, getSources, getSourceTypes, getType, hashCode, initialize, newSourceType, newSourceType, newSourceType, newSourceType, newSourceType, newSourceType, newType, newType, registerSource
-
Methods inherited from class com.exedio.cope.Feature
afterModelCreated, getAbstractType, getAnnotation, getID, getLocalizationKeys, getName, getPattern, isAnnotationPresent, isSourceAlready, mount, readResolve, requireMounted, toString, toString, writeReplace
-
-
-
-
Constructor Detail
-
MediaFilter
protected MediaFilter(Media source)
-
-
Method Detail
-
getSource
public final Media getSource()
-
isFinal
public boolean isFinal()
Description copied from class:MediaPath
Returns, whether the contents of this media path may change or not. The default implementation returns false.
-
getLastModified
public final Date getLastModified(Item item)
Description copied from class:MediaPath
The default implementation returns null.- Overrides:
getLastModified
in classMediaPath
- Parameters:
item
- the item which has the LastModified information
-
getURLWithFallbackToSource
public final String getURLWithFallbackToSource(@Nonnull Item item)
Returns the same result asgetURL
, if this filter supports filtering thesource media
for this item. Otherwise it returnsgetSource()
.getURL(item)
.
-
getLocatorWithFallbackToSource
public final MediaPath.Locator getLocatorWithFallbackToSource(@Nonnull Item item)
Returns the same result asgetLocator
, if this filter supports filtering thesource media
for this item. Otherwise it returnsgetSource()
.getLocator(item)
.
-
isMandatory
public final boolean isMandatory()
Description copied from class:MediaPath
A MediaPath is "mandatory" ifMediaPath.getContentType(Item)
andMediaPath.getLocator(Item)
will not returnnull
for any item.- Specified by:
isMandatory
in classMediaPath
-
isNull
public final Condition isNull()
Description copied from class:MediaPath
Returns a condition matching all items, for whichMediaPath.getLocator(Item)
returns null.
-
isNull
public final Condition isNull(Join join)
Description copied from class:MediaPath
Returns a condition matching all items, for whichMediaPath.getLocator(Item)
returns null.
-
isNotNull
public final Condition isNotNull()
Description copied from class:MediaPath
Returns a condition matching all items, for whichMediaPath.getLocator(Item)
does not return null.
-
isNotNull
public final Condition isNotNull(Join join)
Description copied from class:MediaPath
Returns a condition matching all items, for whichMediaPath.getLocator(Item)
does not return null.
-
-