org.exoplatform.services.wcm.link
Class LiveLinkManagerServiceImpl

java.lang.Object
  extended by org.exoplatform.services.wcm.link.LiveLinkManagerServiceImpl
All Implemented Interfaces:
LiveLinkManagerService

public class LiveLinkManagerServiceImpl
extends java.lang.Object
implements LiveLinkManagerService

Created by The eXo Platform SAS Author : Phan Le Thanh Chuong chuong_phan@exoplatform.com Aug 6, 2008


Constructor Summary
LiveLinkManagerServiceImpl(WCMConfigurationService configurationService, org.exoplatform.services.jcr.RepositoryService repositoryService, LivePortalManagerService livePortalManagerService, org.exoplatform.services.cache.CacheService cacheService, org.exoplatform.container.xml.InitParams initParams)
          Instantiates a new live link manager service impl.
 
Method Summary
 java.util.List<java.lang.String> extractLinks(javax.jcr.Node htmlFile)
          Extract all link (a, iframe, frame, href) and all image (img) from html document
 java.util.List<java.lang.String> getBrokenLinks(javax.jcr.Node webContent)
          Gets the broken links by web content.
 java.util.List<LinkBean> getBrokenLinks(java.lang.String portalName)
          Gets the broken links by portal.
 void updateLinkDataForNode(javax.jcr.Node webContent, java.util.List<java.lang.String> newLinks)
          Add exo:links (multi value) property of exo:linkable node type to web content node, with pattern
 void updateLinks()
          Get all link existed in all portal and update status for them (live or broken)
 void updateLinks(java.lang.String portalName)
          Get all link existed in specified portal and update status for them (live or broken)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LiveLinkManagerServiceImpl

public LiveLinkManagerServiceImpl(WCMConfigurationService configurationService,
                                  org.exoplatform.services.jcr.RepositoryService repositoryService,
                                  LivePortalManagerService livePortalManagerService,
                                  org.exoplatform.services.cache.CacheService cacheService,
                                  org.exoplatform.container.xml.InitParams initParams)
                           throws java.lang.Exception
Instantiates a new live link manager service impl.

Parameters:
configurationService - the configuration service
repositoryService - the repository service
livePortalManagerService - the live portal manager service
cacheService - the cache service
initParams - the init params
Throws:
java.lang.Exception - the exception
Method Detail

getBrokenLinks

public java.util.List<LinkBean> getBrokenLinks(java.lang.String portalName)
                                        throws java.lang.Exception
Description copied from interface: LiveLinkManagerService
Gets the broken links by portal.

Specified by:
getBrokenLinks in interface LiveLinkManagerService
Parameters:
portalName - the portal name
Returns:
the broken links
Throws:
java.lang.Exception - the exception

getBrokenLinks

public java.util.List<java.lang.String> getBrokenLinks(javax.jcr.Node webContent)
                                                throws java.lang.Exception
Description copied from interface: LiveLinkManagerService
Gets the broken links by web content.

Specified by:
getBrokenLinks in interface LiveLinkManagerService
Parameters:
webContent - the web content
Returns:
the broken links
Throws:
java.lang.Exception - the exception

updateLinks

public void updateLinks()
                 throws java.lang.Exception
Description copied from interface: LiveLinkManagerService
Get all link existed in all portal and update status for them (live or broken)

Specified by:
updateLinks in interface LiveLinkManagerService
Throws:
java.lang.Exception - the exception

updateLinks

public void updateLinks(java.lang.String portalName)
                 throws java.lang.Exception
Description copied from interface: LiveLinkManagerService
Get all link existed in specified portal and update status for them (live or broken)

Specified by:
updateLinks in interface LiveLinkManagerService
Parameters:
portalName - the portal name
Throws:
java.lang.Exception - the exception

extractLinks

public java.util.List<java.lang.String> extractLinks(javax.jcr.Node htmlFile)
                                              throws java.lang.Exception
Description copied from interface: LiveLinkManagerService
Extract all link (a, iframe, frame, href) and all image (img) from html document

Specified by:
extractLinks in interface LiveLinkManagerService
Parameters:
htmlFile - the node html file
Returns:
the list of link's URL
Throws:
java.lang.Exception - the exception

updateLinkDataForNode

public void updateLinkDataForNode(javax.jcr.Node webContent,
                                  java.util.List<java.lang.String> newLinks)
                           throws java.lang.Exception
Description copied from interface: LiveLinkManagerService
Add exo:links (multi value) property of exo:linkable node type to web content node, with pattern

Specified by:
updateLinkDataForNode in interface LiveLinkManagerService
Parameters:
webContent - the current web content node
newLinks - the list of new links will be updated
Throws:
java.lang.Exception - the exception


Copyright © 2010 eXo Platform SAS. All Rights Reserved.