/** * Creates a new link object without a reference to the xml page link element.<p> * * @param name the internal name of this link * @param type the type of this link * @param structureId the structure id of the link * @param uri the link uri * @param internal indicates if the link is internal within OpenCms */ public CmsLink(String name, CmsRelationType type, CmsUUID structureId, String uri, boolean internal) { m_element = null; m_name = name; m_type = type; m_internal = internal; m_structureId = structureId; m_uri = uri; // update component members from the uri setComponents(); }
/** * Creates a new link object without a reference to the xml page link element.<p> * * @param name the internal name of this link * @param type the type of this link * @param structureId the structure id of the link * @param uri the link uri * @param internal indicates if the link is internal within OpenCms */ public CmsLink(String name, CmsRelationType type, CmsUUID structureId, String uri, boolean internal) { m_element = null; m_name = name; m_type = type; m_internal = internal; m_structureId = structureId; m_uri = uri; // update component members from the uri setComponents(); }
/** * Updates the uri of this link with a new value.<p> * * Also updates the structure of the underlying XML page document this link belongs to.<p> * * Note that you can <b>not</b> 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.<p> * * @param uri the uri to update this link with <code>scheme://authority/path#anchor?query</code> */ public void updateLink(String uri) { // set the uri m_uri = uri; // update the components setComponents(); // update the xml CmsLinkUpdateUtil.updateXml(this, m_element, true); }
/** * Updates the uri of this link with a new value.<p> * * Also updates the structure of the underlying XML page document this link belongs to.<p> * * Note that you can <b>not</b> 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.<p> * * @param uri the uri to update this link with <code>scheme://authority/path#anchor?query</code> */ public void updateLink(String uri) { // set the uri m_uri = uri; // update the components setComponents(); // update the xml CmsLinkUpdateUtil.updateXml(this, m_element, true); }