|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.staticexport.CmsLink
A single link entry in the link table.
Constructor Summary | |
CmsLink(org.dom4j.Element element,
java.lang.String name,
java.lang.String type,
java.lang.String uri,
boolean internal)
Creates a new link object with a reference to the xml page link element. |
|
CmsLink(org.dom4j.Element element,
java.lang.String name,
java.lang.String type,
java.lang.String target,
java.lang.String anchor,
java.lang.String query,
boolean internal)
Creates a new link object with a reference to the xml page link element. |
|
CmsLink(java.lang.String name,
java.lang.String type,
java.lang.String uri,
boolean internal)
Creates a new link object without a reference to the xml page link element. |
|
CmsLink(java.lang.String name,
java.lang.String type,
java.lang.String target,
java.lang.String anchor,
java.lang.String query,
boolean internal)
Creates a new link object without a reference to the xml page link element. |
Method Summary | |
java.lang.String |
getAnchor()
Returns the anchor of this link. |
java.lang.String |
getName()
Returns the macro name of this link. |
java.lang.String |
getParameter(java.lang.String name)
Returns the first parameter value for the given parameter name. |
java.util.Map |
getParameterMap()
Returns the map of parameters of this link. |
java.util.Set |
getParameterNames()
Returns the set of available parameter names for this link. |
java.lang.String[] |
getParameterValues(java.lang.String name)
Returns all parameter values for the given name. |
java.lang.String |
getQuery()
Returns the query of this link. |
java.lang.String |
getSiteRoot()
Return the site root of the target if it is internal. |
java.lang.String |
getTarget()
Returns the target (destination) of this link. |
java.lang.String |
getType()
Returns the type of this link. |
java.lang.String |
getUri()
Returns the raw uri of this link. |
java.lang.String |
getVfsUri()
Returns the vfs link of the target if it is internal. |
boolean |
isInternal()
Returns if the link is internal. |
java.lang.String |
toString()
|
void |
updateLink(java.lang.String uri)
Updates the uri of this link with a new value. |
void |
updateLink(java.lang.String target,
java.lang.String anchor,
java.lang.String query)
Updates the uri of this link with a new target, anchor and query. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public CmsLink(org.dom4j.Element element, java.lang.String name, java.lang.String type, java.lang.String uri, boolean internal)
element
- the xml link element referencename
- the internal name of this linktype
- the type of this linkuri
- the link uriinternal
- indicates if the link is internal within OpenCmspublic CmsLink(org.dom4j.Element element, java.lang.String name, java.lang.String type, java.lang.String target, java.lang.String anchor, java.lang.String query, boolean internal)
element
- the xml link element referencename
- the internal name of this linktype
- the type of this linktarget
- the link target (without anchor/query)anchor
- the anchor or nullquery
- the query or nullinternal
- indicates if the link is internal within OpenCmspublic CmsLink(java.lang.String name, java.lang.String type, java.lang.String uri, boolean internal)
name
- the internal name of this linktype
- the type of this linkuri
- the link uriinternal
- indicates if the link is internal within OpenCmspublic CmsLink(java.lang.String name, java.lang.String type, java.lang.String target, java.lang.String anchor, java.lang.String query, boolean internal)
name
- the internal name of this linktype
- the type of this linktarget
- the link target (without anchor/query)anchor
- the anchor or nullquery
- the query or nullinternal
- indicates if the link is internal within OpenCmsMethod Detail |
public java.lang.String getAnchor()
public java.lang.String getName()
public java.lang.String getParameter(java.lang.String name)
name
- the name of the parameter
null
public java.util.Map getParameterMap()
Map(String[])
)public java.util.Set getParameterNames()
Set
of parameter namespublic java.lang.String[] getParameterValues(java.lang.String name)
name
- the name of the parameter
String[]
of all parameter values or null
public java.lang.String getQuery()
public java.lang.String getSiteRoot()
public java.lang.String getTarget()
public java.lang.String getType()
public java.lang.String getUri()
public java.lang.String getVfsUri()
public boolean isInternal()
public java.lang.String toString()
Object.toString()
public void updateLink(java.lang.String uri)
Also updates the structure of the underlying XML page document this link belongs to.
Note that you can not update the "internal" or "type" values of the link, so the new link must be of same type (A, IMG) and also remain either an internal or external link.
uri
- the uri to update this link with scheme://authority/path#anchor?query
public void updateLink(java.lang.String target, java.lang.String anchor, java.lang.String query)
If anchor and/or query are null
, this features are not used.
Note that you can not update the "internal" or "type" values of the link, so the new link must be of same type (A, IMG) and also remain either an internal or external link.
Also updates the structure of the underlying XML page document this link belongs to.
target
- the target (destination) of this linkanchor
- the anchor or null if undefinedquery
- the query or null if undefined
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |