|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.riotfamily.cachius.TaggingContext
public class TaggingContext
Provides static methods to tag cache items.
Method Summary | |
---|---|
static void |
addFile(File file)
|
void |
addInvolvedFile(File file)
Adds the given file. |
void |
addInvolvedFiles(Collection<File> files)
|
void |
addTag(String tag)
Adds the given tag. |
void |
addTags(Collection<String> tags)
|
void |
close()
Closes the context making its parent the new current context. |
static TaggingContext |
getContext()
Retrieves the context for the current thread. |
HashSet<File> |
getInvolvedFiles()
|
TaggingContext |
getParent()
Returns the parent context, or null if it is the root
context. |
Set<String> |
getTags()
Returns the tags assigned via the addTag(String) method. |
boolean |
hasTag(String tag)
|
static void |
inheritFrom(CacheItem cacheItem)
|
static void |
inheritFrom(TaggingContext other)
|
boolean |
isPreventCaching()
|
static TaggingContext |
openNestedContext()
Opens a nested context. |
static void |
preventCaching()
|
void |
setPreventCaching(boolean preventCaching)
Sets whether caching should be prevented, i.e. the CacheItem should be discarded. |
static void |
tag(String tag)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public TaggingContext getParent()
null
if it is the root
context.
public void addTag(String tag)
IllegalArgumentException
- if the tag is null
public void addTags(Collection<String> tags)
public boolean hasTag(String tag)
public void addInvolvedFile(File file)
IllegalArgumentException
- if the tag is null
public void addInvolvedFiles(Collection<File> files)
public void setPreventCaching(boolean preventCaching)
public boolean isPreventCaching()
public Set<String> getTags()
addTag(String)
method.
public HashSet<File> getInvolvedFiles()
public void close()
public static void tag(String tag)
public static void addFile(File file)
public static void preventCaching()
public static TaggingContext openNestedContext()
public static TaggingContext getContext()
null
if no open context exists.
public static void inheritFrom(CacheItem cacheItem)
public static void inheritFrom(TaggingContext other)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |