org.apache.lenya.cms.linking
Class ContentLinkManager
java.lang.Object
org.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.lenya.cms.linking.ContentLinkManager
- All Implemented Interfaces:
- org.apache.avalon.framework.logger.LogEnabled, org.apache.avalon.framework.service.Serviceable, LinkManager
public class ContentLinkManager
- extends org.apache.avalon.framework.logger.AbstractLogEnabled
- implements LinkManager, org.apache.avalon.framework.service.Serviceable
Basic link manager implementation which searches for links by parsing the
document content. For better performance use an implementation which is based
on meta data or a centralized link registry.
Field Summary |
protected org.apache.avalon.framework.service.ServiceManager |
manager
|
Fields inherited from interface org.apache.lenya.cms.linking.LinkManager |
ROLE |
Method Summary |
Link[] |
getLinksFrom(org.apache.lenya.cms.publication.Document source)
Returns all links from a document. |
org.apache.lenya.cms.publication.Document[] |
getReferencingDocuments(org.apache.lenya.cms.publication.Document target)
Returns all documents which reference a certain document. |
protected boolean |
isLinkUri(java.lang.String uri)
|
void |
service(org.apache.avalon.framework.service.ServiceManager manager)
|
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 |
manager
protected org.apache.avalon.framework.service.ServiceManager manager
ContentLinkManager
public ContentLinkManager()
getLinksFrom
public Link[] getLinksFrom(org.apache.lenya.cms.publication.Document source)
- Description copied from interface:
LinkManager
- Returns all links from a document.
- Specified by:
getLinksFrom
in interface LinkManager
- Parameters:
source
- The document.
- Returns:
- An array of links.
isLinkUri
protected boolean isLinkUri(java.lang.String uri)
getReferencingDocuments
public org.apache.lenya.cms.publication.Document[] getReferencingDocuments(org.apache.lenya.cms.publication.Document target)
- Description copied from interface:
LinkManager
- Returns all documents which reference a certain document. This depends on
the currently available translations of the target document and the link
resolver fallback mode.
- Specified by:
getReferencingDocuments
in interface LinkManager
- Parameters:
target
- The target document.
- Returns:
- An array of documents.
service
public void service(org.apache.avalon.framework.service.ServiceManager manager)
throws org.apache.avalon.framework.service.ServiceException
- Specified by:
service
in interface org.apache.avalon.framework.service.Serviceable
- Throws:
org.apache.avalon.framework.service.ServiceException
Copyright © $ Apache Software Foundation. All Rights Reserved.