Package com.exedio.cope.pattern
Class TextUrlFilter
- java.lang.Object
-
- com.exedio.cope.Feature
-
- com.exedio.cope.Pattern
-
- com.exedio.cope.pattern.MediaPath
-
- com.exedio.cope.pattern.MediaFilter
-
- com.exedio.cope.pattern.TextUrlFilter
-
- All Implemented Interfaces:
TextUrlFilterCheckable
,Serializable
public class TextUrlFilter extends MediaFilter implements TextUrlFilterCheckable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
TextUrlFilter.Paste
-
Nested classes/interfaces inherited from class com.exedio.cope.pattern.MediaPath
MediaPath.Locator, MediaPath.Log, MediaPath.NotFound
-
-
Constructor Summary
Constructors Constructor Description TextUrlFilter(Media raw, String supportedContentType, String encoding, String pasteStart, String pasteStop, StringField pasteKey, Media pasteValue)
Deprecated.TextUrlFilter(Media raw, String supportedContentType, Charset charset, String pasteStart, String pasteStop, StringField pasteKey, Media pasteValue)
-
Method Summary
-
Methods inherited from class com.exedio.cope.pattern.MediaFilter
getLastModified, getLocatorWithFallbackToSource, getSource, getURLWithFallbackToSource, isFinal, isMandatory, isNotNull, isNotNull, isNull, isNull
-
Methods inherited from class com.exedio.cope.pattern.MediaPath
commit, getExceptionLogs, getGuessedUrlLogs, getInfo, getInvalidSpecialLogs, getIsNullLogs, getLocator, getNamedURL, getNoSuchItemLogs, getNoSuchPath, getNoSuchPathLogs, getNotAnItemLogs, getNotComputableLogs, getURL, incrementDelivered, isUrlFingerPrinted, isUrlGuessingPrevented, isUrlGuessingPreventedSecurely, notFoundIsNull, notFoundNotComputable
-
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
-
TextUrlFilter
public TextUrlFilter(Media raw, String supportedContentType, Charset charset, String pasteStart, String pasteStop, StringField pasteKey, Media pasteValue)
-
TextUrlFilter
@Deprecated public TextUrlFilter(Media raw, String supportedContentType, String encoding, String pasteStart, String pasteStop, StringField pasteKey, Media pasteValue)
Deprecated.
-
-
Method Detail
-
setRaw
public final void setRaw(@Nonnull Item item, Media.Value raw) throws IOException
- Throws:
IOException
-
addPaste
@Nonnull public final TextUrlFilter.Paste addPaste(@Nonnull Item item, @Nonnull String key, @Nonnull Media.Value value)
-
modifyPaste
public final void modifyPaste(@Nonnull Item item, @Nonnull String key, @Nonnull Media.Value value) throws IOException
- Throws:
IOException
-
putPaste
@Nonnull public final TextUrlFilter.Paste putPaste(@Nonnull Item item, @Nonnull String key, @Nonnull Media.Value value) throws IOException
- Throws:
IOException
-
getPasteLocator
public final MediaPath.Locator getPasteLocator(Item item, String key)
-
onMount
protected final void onMount()
Description copied from class:Pattern
Here you can do additional initialization not yet done in the constructor. In this method you can call methodsPattern.getType()
andFeature.getName()
for the first time.
-
getContentType
public final String getContentType(Item item)
- Specified by:
getContentType
in classMediaPath
-
isContentTypeWrapped
public final boolean isContentTypeWrapped()
- Overrides:
isContentTypeWrapped
in classMediaPath
-
doGetAndCommit
public final void doGetAndCommit(HttpServletRequest request, HttpServletResponse response, Item item) throws IOException, MediaPath.NotFound
Description copied from class:MediaPath
The implementor MUSTcommit
the transaction, if the method completes normally (without exception). Otherwise the implementor may or may not commit the transaction.- Specified by:
doGetAndCommit
in classMediaPath
- Throws:
IOException
MediaPath.NotFound
-
getContent
@Nonnull public final String getContent(@Nonnull Item item, @Nonnull HttpServletRequest request) throws MediaPath.NotFound
- Throws:
MediaPath.NotFound
-
check
@Nonnull public Set<String> check(@Nonnull Item item) throws MediaPath.NotFound
- Specified by:
check
in interfaceTextUrlFilterCheckable
- Throws:
MediaPath.NotFound
-
appendKey
protected void appendKey(StringBuilder bf, Item item, String key, HttpServletRequest request)
-
appendURL
protected void appendURL(StringBuilder bf, TextUrlFilter.Paste paste, HttpServletRequest request)
-
getSupportedSourceContentTypes
public final Set<String> getSupportedSourceContentTypes()
- Specified by:
getSupportedSourceContentTypes
in classMediaFilter
-
putPastesFromZip
public final void putPastesFromZip(@Nonnull Item item, @Nonnull File file) throws IOException
- Throws:
IOException
-
getSupportedPasteContentTypes
@Deprecated public final List<String> getSupportedPasteContentTypes()
Deprecated.UsegetPasteContentTypesAllowed()
instead
-
getPasteUrl
@Deprecated public final String getPasteUrl(Item item, String key)
Deprecated.UsegetPasteURL(Item,String)
instead
-
-