nl.gx.webmanager.services.seo.entity.impl
Class PageFriendlyURLEntityImpl

java.lang.Object
  extended by nl.gx.webmanager.services.seo.entity.impl.FriendlyURLEntityImpl
      extended by nl.gx.webmanager.services.seo.entity.impl.PageFriendlyURLEntityImpl
All Implemented Interfaces:
FriendlyURLEntityMutator, PageFriendlyURLEntityMutator, FriendlyURLEntity, PageFriendlyURLEntity

public final class PageFriendlyURLEntityImpl
extends FriendlyURLEntityImpl
implements PageFriendlyURLEntityMutator

Representation of a friendly URL of a page. A page is located by a page ID (id) and a language ID (langid).

Author:
Sander Dahlberg

Nested Class Summary
 
Nested classes/interfaces inherited from interface nl.gx.webmanager.services.seo.FriendlyURLEntity
FriendlyURLEntity.ContentType
 
Field Summary
 
Fields inherited from interface nl.gx.webmanager.services.seo.PageFriendlyURLEntity
ID_PART, LANGID_PART
 
Fields inherited from interface nl.gx.webmanager.services.seo.FriendlyURLEntity
PATH_SEPARATOR
 
Constructor Summary
PageFriendlyURLEntityImpl(int pageId, int pageVersionId, int langId, java.lang.String urlTitle, int websiteId, boolean isActive, boolean isLive)
          Constructor used to create a new page friendly URL entity.
PageFriendlyURLEntityImpl(int id, java.lang.String urlIdentifier, java.lang.String entityIdentifier, java.lang.String urlTitle, int websiteId, java.lang.Integer sequenceNumber, boolean activated, boolean alternative, boolean isLive, java.lang.String queryString, java.util.Date entryDate, FriendlyURLEntity reference, int pageVersionId)
          Constructor used to instantiate an existing friendly URL entity when all fields are available.
 
Method Summary
 FriendlyURLEntity.ContentType getContentType()
          Returns the content type of the friendly URL entity.
 java.lang.Integer getDepth()
          Deprecated. 
 java.lang.Integer getLangId()
          Returns the language identifier of the friendly URL.
 java.lang.Integer getPageId()
          Returns the page identifier of the friendly URL.
 java.lang.Integer getPageVersionId()
          Deprecated. 
 java.lang.String getURLTitlePath()
          Returns the URL title path of the friendly URL.
 java.lang.Integer getVersionId()
          Returns the version id of the friendly URL.
 void renamePathPart(int depth, java.lang.String urlTitle)
          Deprecated. 
 void renameStartPath(int depth, java.lang.String replace)
          Deprecated. 
 void setURLPath(java.lang.String urlTitlePath)
          Sets the URL path of both the URL identifier as the URL title to the given URL title path.
 java.lang.String toString()
          
 
Methods inherited from class nl.gx.webmanager.services.seo.entity.impl.FriendlyURLEntityImpl
equals, getAlternativePath, getBaseEntityIdentifier, getBaseIdentifier, getBaseURLTitleEntityIdentifier, getEntityIdentifier, getEntryDate, getId, getQueryString, getReference, getSequenceNumber, getURLIdentifier, getURLTitle, getURLTitleEntity, getWebsiteId, hashCode, isActivated, isAlternative, isCurrent, isLive, setActivated, setAlternative, setId, setLive, setReference, setSequenceNumber, setURLTitle, setURLTitleIdentifier
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface nl.gx.webmanager.services.seo.entity.FriendlyURLEntityMutator
setActivated, setAlternative, setId, setLive, setReference, setSequenceNumber, setURLTitleIdentifier
 
Methods inherited from interface nl.gx.webmanager.services.seo.FriendlyURLEntity
getAlternativePath, getBaseEntityIdentifier, getBaseIdentifier, getBaseURLTitleEntityIdentifier, getEntityIdentifier, getEntryDate, getId, getQueryString, getReference, getSequenceNumber, getURLIdentifier, getURLTitle, getURLTitleEntity, getWebsiteId, isActivated, isAlternative, isCurrent, isLive
 

Constructor Detail

PageFriendlyURLEntityImpl

public PageFriendlyURLEntityImpl(int pageId,
                                 int pageVersionId,
                                 int langId,
                                 java.lang.String urlTitle,
                                 int websiteId,
                                 boolean isActive,
                                 boolean isLive)
Constructor used to create a new page friendly URL entity.

Parameters:
pageId - Identifier of the page.
pageVersionId - Page version identifier.
langId - Language identifier of the page.
urlTitle - URL title of that page.
websiteId - Host id for which the friendly URL exists.
isActive - true if the URL title is active, that is, is accessible, false otherwise.
isLive - true is the page pointed by the URL title is current, false otherwise.

PageFriendlyURLEntityImpl

public PageFriendlyURLEntityImpl(int id,
                                 java.lang.String urlIdentifier,
                                 java.lang.String entityIdentifier,
                                 java.lang.String urlTitle,
                                 int websiteId,
                                 java.lang.Integer sequenceNumber,
                                 boolean activated,
                                 boolean alternative,
                                 boolean isLive,
                                 java.lang.String queryString,
                                 java.util.Date entryDate,
                                 FriendlyURLEntity reference,
                                 int pageVersionId)
Constructor used to instantiate an existing friendly URL entity when all fields are available.

Parameters:
id - The identifier of the entity.
urlIdentifier - The URL identifier of the entity.
entityIdentifier - The entity identifier of the entity.
urlTitle - The URL title of the entity.
websiteId - The host id of the entity.
sequenceNumber - The sequence number of the entity.
activated - The activated bit the entity.
alternative - The alternative path of the entity.
isLive - The live bit of the entity.
queryString - The query string of the entity.
entryDate - The creation date of the entity.
reference - The reference of the entity.
pageVersionId - The page version id of the entity.
Method Detail

getContentType

public FriendlyURLEntity.ContentType getContentType()
Returns the content type of the friendly URL entity.

Specified by:
getContentType in interface FriendlyURLEntity
Overrides:
getContentType in class FriendlyURLEntityImpl
Returns:
The content type of the friendly URL entity.

getPageId

public java.lang.Integer getPageId()
Returns the page identifier of the friendly URL.

Specified by:
getPageId in interface PageFriendlyURLEntity
Returns:
The page identifier of the friendly URL.

getVersionId

public java.lang.Integer getVersionId()
Returns the version id of the friendly URL.

Specified by:
getVersionId in interface FriendlyURLEntity
Overrides:
getVersionId in class FriendlyURLEntityImpl
Returns:
The version id of the friendly URL.

getPageVersionId

@Deprecated
public java.lang.Integer getPageVersionId()
Deprecated. 

Returns the page version identifier of the friendly URL.

Specified by:
getPageVersionId in interface PageFriendlyURLEntity
Returns:
The page version identifier of the friendly URL.

getLangId

public java.lang.Integer getLangId()
Returns the language identifier of the friendly URL.

Specified by:
getLangId in interface PageFriendlyURLEntity
Returns:
The language identifier of the friendly URL.

getDepth

@Deprecated
public java.lang.Integer getDepth()
Deprecated. 

Returns how many page parts the URL identifier path has.

Specified by:
getDepth in interface PageFriendlyURLEntity
Returns:
The number of page parts.

getURLTitlePath

public java.lang.String getURLTitlePath()
Returns the URL title path of the friendly URL. That is the URL title without the last element, leaving the path.

Specified by:
getURLTitlePath in interface PageFriendlyURLEntity
Returns:
The URL title path.

setURLPath

public void setURLPath(java.lang.String urlTitlePath)
Sets the URL path of both the URL identifier as the URL title to the given URL title path.

Specified by:
setURLPath in interface PageFriendlyURLEntityMutator
Parameters:
urlTitlePath - The new URL title path.

renameStartPath

@Deprecated
public void renameStartPath(int depth,
                                       java.lang.String replace)
Deprecated. 

Replaces the first depth page parts with replace.

Specified by:
renameStartPath in interface PageFriendlyURLEntityMutator
Parameters:
depth - Remove the first page part till this depth.
replace - String to replace it with.

renamePathPart

@Deprecated
public void renamePathPart(int depth,
                                      java.lang.String urlTitle)
Deprecated. 

Renames a higher level entity identifier in the page path of this friendly URL entity. For example, when the URL identifier currently is /a/b/c and the following statement is executed: renamePathPart(2, "d") then the URL identifier (and URL title) becomes a/d/c. This method operates in memory, the change is not persisted.

Note that if replace is an empty string then the page part is removed from the path.

Specified by:
renamePathPart in interface PageFriendlyURLEntityMutator
Parameters:
depth - Specifies the path part to rename starting with index 1.
urlTitle - The string to replace the specified path part with.

toString

public java.lang.String toString()

Overrides:
toString in class FriendlyURLEntityImpl


Copyright © 2007-2011 GX Software BV. All Rights Reserved.