|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opencms.staticexport.CmsLink
public class CmsLink
A single link entry in the link table.
| Constructor Summary | |
|---|---|
CmsLink(Element element,
String name,
String type,
String uri,
boolean internal)
Creates a new link object with a reference to the xml page link element. |
|
CmsLink(Element element,
String name,
String type,
String target,
String anchor,
String query,
boolean internal)
Creates a new link object with a reference to the xml page link element. |
|
CmsLink(String name,
String type,
String uri,
boolean internal)
Creates a new link object without a reference to the xml page link element. |
|
CmsLink(String name,
String type,
String target,
String anchor,
String query,
boolean internal)
Creates a new link object without a reference to the xml page link element. |
|
| Method Summary | |
|---|---|
String |
getAnchor()
Returns the anchor of this link. |
String |
getName()
Returns the macro name of this link. |
String |
getParameter(String name)
Returns the first parameter value for the given parameter name. |
Map |
getParameterMap()
Returns the map of parameters of this link. |
Set |
getParameterNames()
Returns the set of available parameter names for this link. |
String[] |
getParameterValues(String name)
Returns all parameter values for the given name. |
String |
getQuery()
Returns the query of this link. |
String |
getSiteRoot()
Return the site root of the target if it is internal. |
String |
getTarget()
Returns the target (destination) of this link. |
String |
getType()
Returns the type of this link. |
String |
getUri()
Returns the raw uri of this link. |
String |
getVfsUri()
Returns the vfs link of the target if it is internal. |
boolean |
isInternal()
Returns if the link is internal. |
String |
toString()
|
void |
updateLink(String uri)
Updates the uri of this link with a new value. |
void |
updateLink(String target,
String anchor,
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(Element element,
String name,
String type,
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 OpenCms
public CmsLink(Element element,
String name,
String type,
String target,
String anchor,
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 OpenCms
public CmsLink(String name,
String type,
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 OpenCms
public CmsLink(String name,
String type,
String target,
String anchor,
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 OpenCms| Method Detail |
|---|
public String getAnchor()
public String getName()
public String getParameter(String name)
name - the name of the parameter
nullpublic Map getParameterMap()
Map(String[]))public Set getParameterNames()
Set of parameter namespublic String[] getParameterValues(String name)
name - the name of the parameter
String[] of all parameter values or nullpublic String getQuery()
public String getSiteRoot()
public String getTarget()
public String getType()
public String getUri()
public String getVfsUri()
public boolean isInternal()
public String toString()
toString in class ObjectObject.toString()public void updateLink(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(String target,
String anchor,
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 | |||||||||