Interface ResourceEntry.OperationalStrategy
- Enclosing interface:
ResourceEntry
public static interface ResourceEntry.OperationalStrategy
A Operational Strategy type for the supplied
ResourceEntry. This performs the operations on the
underlying ResourceEntry.-
Method Summary
Modifier and TypeMethodDescriptiondefault booleandoDelete(ResourceEntry entry) Performs the operation to clear this entry and return it to nascent state.default Optional<ResourceContents> Specifies how theResourceEntryloads contents.default Optional<ResourceId> doFindResourceId(ResourceEntry entry) Finds theResourceIdfor theResourceEntry.Gets the immutable reverse links from theResourceEntrydefault booleandoIsOriginalContent(ResourceEntry entry) Returns true if the content is the original content.default booleanReturns true if the content is the original content.default booleandoLink(ResourceEntry entry, Path toLink) Specifies how theResourceEntryunlinks from the whole view of the snapshot.default booleandoUnlink(ResourceEntry entry, Path toUnlink) Specifies how theResourceEntryunlinks from the whole view of the snapshot.default ResourceContentsdoUpdateResourceContents(ResourceEntry resourceEntry) Specifies how theResourceEntryupdates contents.
-
Method Details
-
doIsOriginalContent
Returns true if the content is the original content.- Parameters:
entry- theResourceEntry- Returns:
- true if the content is original
-
doIsOriginalReversePaths
Returns true if the content is the original content.- Parameters:
entry- theResourceEntry- Returns:
- true if the content is original
-
doFindResourceId
Finds theResourceIdfor theResourceEntry.- Returns:
- the
Optional<ResourceId>containing aResourceId, or empty value
-
doLink
Specifies how theResourceEntryunlinks from the whole view of the snapshot.- Parameters:
entry- the entrytoLink- the path to unlink- Returns:
- true if the linking was successful, false otherwise
-
doUnlink
Specifies how theResourceEntryunlinks from the whole view of the snapshot.- Parameters:
entry- the entrytoUnlink- the path to unlink- Returns:
- true if the unlinking was successful, false otherwise
-
doUpdateResourceContents
Specifies how theResourceEntryupdates contents. -
doFindResourceContents
Specifies how theResourceEntryloads contents.- Parameters:
entry- the entry- Returns:
- the
ReadableByteChannel
-
doGetReversePathsImmutable
Gets the immutable reverse links from theResourceEntry- Parameters:
entry- the entry- Returns:
- a
Set<Path>indicating the reverse linkags of thisResourceEntry
-
doDelete
Performs the operation to clear this entry and return it to nascent state.- Parameters:
entry- the entry to clear
-