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 StringadapterThe object adapter the link may have as ownerprotected List<String>categoriesprotected String[]facetsprotected Stringfragmentprotected Guardguardprotected LinkHandlerhandlerprotected StringhandlerClassprotected Stringidprotected Stringpathprotected Stringtype
-
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 booleanacceptResource(Resource context)voidaddCategories(Collection<String> categories)voidaddCategory(String category)voidapplyFragment(LinkDescriptor fragment)LinkDescriptorclone()booleanequals(Object obj)StringgetAdapter()List<String>getCategories()StringgetCode(LinkDescriptor link, Resource resource)StringgetCode(Resource resource)String[]getFacets()LinkHandlergetHandler()StringgetId()StringgetPath()StringgetType()booleanhasCategory(String category)booleanisEnabled(Resource context)booleanisFragment()voidsetCategories(List<String> categories)voidsetGuard(String expr)voidsetHandler(LinkHandler handler)StringtoString()
-
-
-
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:
getCodein interfaceLinkHandler
-
isFragment
public boolean isFragment()
-
applyFragment
public void applyFragment(LinkDescriptor fragment)
-
clone
public LinkDescriptor clone() throws CloneNotSupportedException
- Overrides:
clonein classObject- Throws:
CloneNotSupportedException
-
-