org.apache.lenya.cms.linking
Class LinkConverter
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.lenya.cms.linking.LinkConverter
- All Implemented Interfaces:
- org.apache.avalon.framework.logger.LogEnabled
public class LinkConverter
- extends org.apache.avalon.framework.logger.AbstractLogEnabled
Utility class to convert lenya-document:
links from and to URL
links.
Constructor Summary |
LinkConverter(org.apache.avalon.framework.service.ServiceManager manager,
org.apache.avalon.framework.logger.Logger logger)
Creates a link converter. |
Method Summary |
void |
convertUrlsToUuids(org.apache.lenya.cms.publication.Document doc,
boolean useContextPath)
Converts all URL-based links to UUID-based links. |
void |
convertUrlsToUuids(org.apache.lenya.cms.publication.Publication srcPub,
org.apache.lenya.cms.publication.Document examinedDocument,
boolean useContextPath)
Converts all URL-based links to UUID-based links. |
protected java.lang.String |
getContextPath()
|
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LinkConverter
public LinkConverter(org.apache.avalon.framework.service.ServiceManager manager,
org.apache.avalon.framework.logger.Logger logger)
- Creates a link converter.
- Parameters:
manager
- The service manager.logger
- The logger.
convertUrlsToUuids
public void convertUrlsToUuids(org.apache.lenya.cms.publication.Document doc,
boolean useContextPath)
- Converts all URL-based links to UUID-based links.
- Parameters:
doc
- The document to convert.useContextPath
- If the request's context path should be considered.
convertUrlsToUuids
public void convertUrlsToUuids(org.apache.lenya.cms.publication.Publication srcPub,
org.apache.lenya.cms.publication.Document examinedDocument,
boolean useContextPath)
- Converts all URL-based links to UUID-based links. The link URLs can
originate from a different publication.
- Parameters:
srcPub
- The publication where the content comes from.examinedDocument
- The document in the target publication.useContextPath
- If the request's context path should be considered.
getContextPath
protected java.lang.String getContextPath()
throws org.apache.avalon.framework.service.ServiceException
- Throws:
org.apache.avalon.framework.service.ServiceException
Copyright © $ Apache Software Foundation. All Rights Reserved.