|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.entityfs.cap.symlink.util.SymbolicLinks
public final class SymbolicLinks
This utility class contains static methods for working with
SymbolicLink
entities.
The methods in this class will use the locking strategy for utility classes
described in EntityLock
.
SymbolicLink
,
DCSymbolicLinkUtil
Method Summary | |
---|---|
static EntityView |
getTarget(SymbolicLinkView sl)
Get the entity referenced by the symbolic link. |
static EntityLocation<?> |
getTargetLocation(SymbolicLinkView sl)
Get the target location for the symbolic link. |
static EntityView |
getTargetOrNull(SymbolicLinkView sl)
Get the entity referenced by the symbolic link, or null if there
is no an entity in the location referenced by the symbolic link. |
static boolean |
targetExists(SymbolicLinkView sl)
Check if there is an entity in the symbolic link's target location. |
static EntityView |
unroll(SymbolicLinkView sl)
See EntityAcceptingEntities.unroll(org.entityfs.EntityAcceptingEntityView)
. |
static EntityView |
unrollOrNull(SymbolicLinkView sl)
See EntityAcceptingEntities.unrollOrNull(org.entityfs.EntityAcceptingEntityView)
. |
static boolean |
unrollTargetExists(SymbolicLinkView sl)
See EntityAcceptingEntities.unrollTargetExists(org.entityfs.EntityAcceptingEntityView)
. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static EntityLocation<?> getTargetLocation(SymbolicLinkView sl)
Entity locks that this method will acquire (temporarily):
sl
- The symbolic link.
SymbolicLinkView.getTargetLocation()
public static EntityView getTarget(SymbolicLinkView sl) throws EntityNotFoundException
getTargetOrNull(SymbolicLinkView)
.
sl
- The symbolic link
EntityNotFoundException
- If there is no entity in the location
referenced by the symbolic link.public static EntityView getTargetOrNull(SymbolicLinkView sl)
null
if there
is no an entity in the location referenced by the symbolic link.
If this method is called with a symbolic link view argument, and the
referenced entity is ViewCapable
, a view of the referenced entity
with the same filters as the argument has, is returned.
Entity locks that this method will acquire (temporarily):
sl
- The symbolic link.
null
if
there is no entity in the symbolic link target location.public static boolean targetExists(SymbolicLinkView sl)
getTargetOrNull(SymbolicLinkView)
.
true
if there is an entity in the symbolic link target
location, false
otherwise.public static EntityView unroll(SymbolicLinkView sl) throws EntityNotFoundException, CircularReferenceException
EntityAcceptingEntities.unroll(org.entityfs.EntityAcceptingEntityView)
.
sl
- The symbolic link to unroll.
EntityNotFoundException
- If there is no entity in the location
referenced by the last symbolic link in the chain.
CircularReferenceException
- If there is a circular reference in
the symbolic link chain.public static EntityView unrollOrNull(SymbolicLinkView sl) throws CircularReferenceException
EntityAcceptingEntities.unrollOrNull(org.entityfs.EntityAcceptingEntityView)
.
sl
- The symbolic link to unroll.
CircularReferenceException
- If there is a circular reference in
the symbolic link chain.public static boolean unrollTargetExists(SymbolicLinkView sl) throws CircularReferenceException
EntityAcceptingEntities.unrollTargetExists(org.entityfs.EntityAcceptingEntityView)
.
sl
- The symbolic link to investigate.
true
if the symbolic link can be unrolled to another
entity.
CircularReferenceException
- If there is a circular reference
somewhere in the chain of symbolic links.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |