|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnl.gx.webmanager.services.seo.handler.impl.FriendlyURLManagerImpl
public final class FriendlyURLManagerImpl
Handles conflict resolving and descendant retrieval.
| Constructor Summary | |
|---|---|
FriendlyURLManagerImpl(InternalSEOService seoService,
FriendlyURLEntityDAO entityDAO)
Constructor. |
|
| Method Summary | |
|---|---|
FriendlyURLEntity |
cloneEntity(FriendlyURLEntity entity)
Clones the in memory friendly URL entity. |
java.util.List<FriendlyURLEntity> |
getDescendantEntities(FriendlyURLEntity entity)
Returns all descendant friendly URL entities for the given page and language. |
java.util.List<FriendlyURLEntity> |
getDescendantEntities(Page page,
Language language)
Returns all descendant friendly URL entities for the given page and language. |
void |
resolve(FriendlyURLEntity resolveEntity,
java.util.List<FriendlyURLEntity> applyToEntities)
Resolves potential URL identifier conflicts for the given entity. |
void |
resolve(java.util.List<FriendlyURLEntity> resolveEntities,
java.util.List<FriendlyURLEntity> applyToEntities)
Resolves potential URL identifier conflicts for the given entities. |
void |
resolveAgainstAlternatives(FriendlyURLEntity rootEntity,
java.util.List<FriendlyURLEntity> resolveEntities)
Resolves all given entities with the alternative entities having an alternative path within the scope of the given root entity. |
java.util.List<FriendlyURLEntity> |
selectSameGeneration(java.util.List<FriendlyURLEntity> entities,
FriendlyURLEntity entity)
Returns a subset from the given entities that have the same URL path level as the given entity. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FriendlyURLManagerImpl(InternalSEOService seoService,
FriendlyURLEntityDAO entityDAO)
seoService - SEO service.entityDAO - Friendly URL entity DAO.| Method Detail |
|---|
public java.util.List<FriendlyURLEntity> getDescendantEntities(Page page,
Language language)
throws FriendlyURLException
This method is more versatile than FriendlyURLManager.getDescendantEntities(FriendlyURLEntity), as there is no
need that a page version for the given page and language should be current, or should even actually
exist.
getDescendantEntities in interface FriendlyURLManagerpage - Page to retrieve descendant URLs for.language - Scope the page's versions to those in this language.
FriendlyURLException - If any access to the persistent layer failed.
public java.util.List<FriendlyURLEntity> getDescendantEntities(FriendlyURLEntity entity)
throws FriendlyURLException
This method is faster than FriendlyURLManager.getDescendantEntities(Page, Language), but restricting demands
exist for the given entity parameter. The given entity must represent a current page version, and not
have an alternative path.
getDescendantEntities in interface FriendlyURLManagerentity - Entity to retrieve descendant URLs for. Entity must return true for
FriendlyURLEntity.isLive() and return false for
FriendlyURLEntity.isAlternative(), or else an IllegalArgumentException
is thrown.
FriendlyURLException - If any access to the persistent layer failed.
public void resolve(FriendlyURLEntity resolveEntity,
java.util.List<FriendlyURLEntity> applyToEntities)
throws FriendlyURLException
FriendlyURLManager.resolve(List, List).
resolve in interface FriendlyURLManagerresolveEntity - Entity that should be resolved.applyToEntities - Potential conflict resolving is propagated to these entities.
FriendlyURLException - If any access to the persistent layer failed.FriendlyURLManager.resolve(List, List).
public void resolve(java.util.List<FriendlyURLEntity> resolveEntities,
java.util.List<FriendlyURLEntity> applyToEntities)
throws FriendlyURLException
applyToEntities.
For example, if an entity with URL identifier /a/b is resolved to become
/a/b 1, and in the applyToEntities list exists an entity with URL identifier
/a/b/c, then this entity gets URL identifier /a/b 1/c.
resolve in interface FriendlyURLManagerresolveEntities - Entities that should be resolved.applyToEntities - Potential conflict resolving is propagated to these entities.
FriendlyURLException - If any access to the persistent layer failed.
public void resolveAgainstAlternatives(FriendlyURLEntity rootEntity,
java.util.List<FriendlyURLEntity> resolveEntities)
throws FriendlyURLException
For example, if root entity has URL identifier /a/b and an entity in the system exists
with an URL identifier with alternative path starting with /a/b, like /a/b/c,
then the resolveEntities list of entities are conflict resolved against the alternative
entity.
resolveAgainstAlternatives in interface FriendlyURLManagerrootEntity - Alternative entities are retrieved with an alternative path starting with the URL
identifier of this root entity.resolveEntities - If there are alternative entities in the domain of the root entity then these
entities are conflict resolved, if needed.
FriendlyURLException - If any access to the persistent layer failed.public FriendlyURLEntity cloneEntity(FriendlyURLEntity entity)
cloneEntity in interface FriendlyURLManagerentity - Entity to clone.
public java.util.List<FriendlyURLEntity> selectSameGeneration(java.util.List<FriendlyURLEntity> entities,
FriendlyURLEntity entity)
/a/b, is said to be a level two entity.
Note that the URL path tree is not necessarily the same as the page tree.
selectSameGeneration in interface FriendlyURLManagerentities - Input entities of which a subset is returned.entity - Entity that determines the level the other entities should have to be returned.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||