Package org.nuxeo.ecm.webengine.model
Class LinkDescriptor
- java.lang.Object
-
- org.nuxeo.ecm.webengine.model.LinkDescriptor
-
- All Implemented Interfaces:
Cloneable
,LinkHandler
public class LinkDescriptor extends Object implements Cloneable, LinkHandler
- Author:
- Bogdan Stefanescu
-
-
Field Summary
Fields Modifier and Type Field Description protected String
adapter
The object adapter the link may have as ownerprotected List<String>
categories
protected String[]
facets
protected String
fragment
protected Guard
guard
protected LinkHandler
handler
protected String
handlerClass
protected String
id
protected String
path
protected String
type
-
Constructor Summary
Constructors Constructor Description LinkDescriptor()
LinkDescriptor(String id)
LinkDescriptor(String id, String fragment)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
acceptResource(Resource context)
void
addCategories(Collection<String> categories)
void
addCategory(String category)
void
applyFragment(LinkDescriptor fragment)
LinkDescriptor
clone()
boolean
equals(Object obj)
String
getAdapter()
List<String>
getCategories()
String
getCode(LinkDescriptor link, Resource resource)
String
getCode(Resource resource)
String[]
getFacets()
LinkHandler
getHandler()
String
getId()
String
getPath()
String
getType()
boolean
hasCategory(String category)
boolean
isEnabled(Resource context)
boolean
isFragment()
void
setCategories(List<String> categories)
void
setGuard(String expr)
void
setHandler(LinkHandler handler)
String
toString()
-
-
-
Field Detail
-
id
protected String id
-
path
protected String path
-
fragment
protected String fragment
-
handler
protected volatile LinkHandler handler
-
handlerClass
protected String handlerClass
-
type
protected String type
-
adapter
protected String adapter
The object adapter the link may have as owner
-
facets
protected String[] facets
-
guard
protected Guard guard
-
-
Method Detail
-
setGuard
public void setGuard(String expr) throws ParseException
- Throws:
ParseException
-
getId
public String getId()
-
getPath
public String getPath()
-
setHandler
public void setHandler(LinkHandler handler)
-
getHandler
public LinkHandler getHandler()
-
getAdapter
public String getAdapter()
-
getType
public String getType()
-
getFacets
public String[] getFacets()
-
addCategories
public void addCategories(Collection<String> categories)
-
addCategory
public void addCategory(String category)
-
hasCategory
public boolean hasCategory(String category)
-
acceptResource
public boolean acceptResource(Resource context)
-
isEnabled
public boolean isEnabled(Resource context)
-
getCode
public String getCode(LinkDescriptor link, Resource resource)
- Specified by:
getCode
in interfaceLinkHandler
-
isFragment
public boolean isFragment()
-
applyFragment
public void applyFragment(LinkDescriptor fragment)
-
clone
public LinkDescriptor clone() throws CloneNotSupportedException
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
-