|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface FriendlyURLManager
This class contains the descendant retrieval and identifier resolving logic.
| 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. |
| Method Detail |
|---|
java.util.List<FriendlyURLEntity> getDescendantEntities(Page page,
Language language)
throws FriendlyURLException
This method is more versatile than 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.
page - 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.
java.util.List<FriendlyURLEntity> getDescendantEntities(FriendlyURLEntity entity)
throws FriendlyURLException
This method is faster than 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.
entity - 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.
void resolve(FriendlyURLEntity resolveEntity,
java.util.List<FriendlyURLEntity> applyToEntities)
throws FriendlyURLException
resolve(List, List).
resolveEntity - Entity that should be resolved.applyToEntities - Potential conflict resolving is propagated to these entities.
FriendlyURLException - If any access to the persistent layer failed.resolve(List, List).
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.
resolveEntities - Entities that should be resolved.applyToEntities - Potential conflict resolving is propagated to these entities.
FriendlyURLException - If any access to the persistent layer failed.
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.
rootEntity - 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.FriendlyURLEntity cloneEntity(FriendlyURLEntity entity)
entity - Entity to clone.
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.
entities - 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 | |||||||||