|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnl.gx.webmanager.services.seo.entity.impl.FriendlyURLEntityImpl
public class FriendlyURLEntityImpl
A FriendlyURLEntity represents (part of) a friendly URL. It consists of a mapping of its URL identifier and
website ID onto an internal location formed by a query string. There are three types of content that can
have a friendly URL: pages, media items and resource instances. Therefore, this class is subclassed to
represent any of these types of content: PageFriendlyURLEntity,
MediaItemFriendlyURLEntity and DBPageFriendlyURLEntity.
| 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.FriendlyURLEntity |
|---|
PATH_SEPARATOR |
| Constructor Summary | |
|---|---|
protected |
FriendlyURLEntityImpl()
Constructor used by subclasses for existing friendly URLs. |
|
FriendlyURLEntityImpl(int id)
Constructor used to instantiate a friendly URL entity based on an existing one. |
protected |
FriendlyURLEntityImpl(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,
FriendlyURLEntity reference,
java.lang.String queryString,
java.util.Date entryDate)
Constructor used to instantiate an existing friendly URL entity when all fields are available. |
protected |
FriendlyURLEntityImpl(java.lang.String urlTitle,
boolean isActive,
boolean isLive,
int websiteId,
java.lang.String queryString)
Constructor used by subclasses for new friendly URLs. |
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getAlternativePath()
Returns the alternative path of the entity. |
java.lang.String |
getBaseEntityIdentifier()
Returns the entity identifier without a potential sequence number. |
java.lang.String |
getBaseIdentifier()
Returns the URL identifier without a potential sequence number. |
java.lang.String |
getBaseURLTitleEntityIdentifier()
Returns the URL title entity without a potential sequence number. |
FriendlyURLEntity.ContentType |
getContentType()
Returns the content type of the friendly URL entity. |
java.lang.String |
getEntityIdentifier()
Returns the entity identifier of the friendly URL. |
java.util.Date |
getEntryDate()
Returns the creation or update date of the friendly URL. |
java.lang.Integer |
getId()
Returns the identifier of the friendly URL. |
java.lang.String |
getQueryString()
Returns the query string of the friendly URL. |
FriendlyURLEntity |
getReference()
Returns the friendly URL entity referred to by the friendly URL. |
java.lang.Integer |
getSequenceNumber()
Returns the sequence number of the friendly URL. |
java.lang.String |
getURLIdentifier()
Returns the URL identifier of the friendly URL. |
java.lang.String |
getURLTitle()
Returns the URL title of the friendly URL. |
java.lang.String |
getURLTitleEntity()
Returns the last element of the URL title. |
java.lang.Integer |
getVersionId()
Returns the version id of the friendly URL. |
java.lang.Integer |
getWebsiteId()
Returns the website id of the friendly URL. |
int |
hashCode()
|
boolean |
isActivated()
Tells whether the friendly URL is activated. |
boolean |
isAlternative()
Tells whether the friendly URL has an alternative path. |
boolean |
isCurrent()
Deprecated. |
boolean |
isLive()
Returns whether the content backed by the query string is last known to be current. |
void |
setActivated(boolean activated)
Sets the activated bit. |
void |
setAlternative(boolean alternative)
Sets the alternative bit for the friendly URL. |
void |
setId(int id)
Sets the id. |
void |
setLive(boolean live)
Sets the is live bit. |
void |
setReference(FriendlyURLEntity friendlyURLEntity)
Sets the friendly URL entity which is referenced by this friendly URL. |
void |
setSequenceNumber(java.lang.Integer sequenceNumber)
Sets the sequence number for the friendly URL. |
protected void |
setURLTitle(java.lang.String urlTitle)
Sets the URL title for the friendly URL. |
void |
setURLTitleIdentifier(java.lang.String urlTitleIdentifier)
Sets the URL title identifier. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public FriendlyURLEntityImpl(int id)
id - Id of the friendly URL.
protected FriendlyURLEntityImpl(java.lang.String urlTitle,
boolean isActive,
boolean isLive,
int websiteId,
java.lang.String queryString)
urlTitle - The URL title of the entity.isActive - true if the URL title is active, that is, is accessible,
false otherwise.isLive - true if the content the URL title is pointing to is current,
false otherwise.websiteId - The website ID for which the entity exists.queryString - The query string representing the identifying part of the internal URL of the
entity.protected FriendlyURLEntityImpl()
protected FriendlyURLEntityImpl(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,
FriendlyURLEntity reference,
java.lang.String queryString,
java.util.Date entryDate)
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.reference - The reference of the entity.queryString - The query string of the entity.entryDate - The creation date of the entity.| Method Detail |
|---|
public final java.lang.Integer getId()
getId in interface FriendlyURLEntitypublic final java.lang.String getURLIdentifier()
getURLIdentifier in interface FriendlyURLEntitypublic final java.lang.String getEntityIdentifier()
getEntityIdentifier in interface FriendlyURLEntitypublic final java.lang.String getURLTitle()
getURLTitle in interface FriendlyURLEntitypublic java.lang.Integer getVersionId()
getVersionId in interface FriendlyURLEntitypublic final java.lang.Integer getWebsiteId()
getWebsiteId in interface FriendlyURLEntitypublic final java.lang.Integer getSequenceNumber()
getSequenceNumber in interface FriendlyURLEntitypublic final boolean isActivated()
isActivated in interface FriendlyURLEntityTrue for a possible indexed friendly URL, false otherwise.public final boolean isAlternative()
isAlternative in interface FriendlyURLEntityTrue for a friendly URL with an alternative path, false otherwise.public final boolean isLive()
isLive in interface FriendlyURLEntitytrue if the content backed by the query string is last known to be current,
false otherwise.public final java.lang.String getQueryString()
getQueryString in interface FriendlyURLEntitypublic final java.util.Date getEntryDate()
getEntryDate in interface FriendlyURLEntitypublic final FriendlyURLEntity getReference()
null the friendly
URL is unavailable, and is redirected to the referred friendly URL.
Note that only the id field of the referenced entity is set.
getReference in interface FriendlyURLEntitypublic FriendlyURLEntity.ContentType getContentType()
getContentType in interface FriendlyURLEntitypublic final void setId(int id)
setId in interface FriendlyURLEntityMutatorid - New id.public final void setSequenceNumber(java.lang.Integer sequenceNumber)
setSequenceNumber in interface FriendlyURLEntityMutatorsequenceNumber - The new sequence number for the friendly URL.public final void setAlternative(boolean alternative)
setAlternative in interface FriendlyURLEntityMutatoralternative - The new alternative bit for the friendly URL.public final void setReference(FriendlyURLEntity friendlyURLEntity)
setReference in interface FriendlyURLEntityMutatorfriendlyURLEntity - The referenced friendly URL entity;public final void setLive(boolean live)
setLive in interface FriendlyURLEntityMutatorlive - The new is live bit for the friendly URL.public final void setActivated(boolean activated)
setActivated in interface FriendlyURLEntityMutatoractivated - The new activated bit for the friendly URL.protected final void setURLTitle(java.lang.String urlTitle)
urlTitle - The new URL title for the friendly URL.public final java.lang.String getAlternativePath()
getAlternativePath in interface FriendlyURLEntitypublic final java.lang.String getBaseIdentifier()
a/b/c 1, where 1 is the sequence number, then the result will be
a/b/c.
getBaseIdentifier in interface FriendlyURLEntitypublic final java.lang.String getBaseEntityIdentifier()
a 1, where 1 is the sequence number, then the result
will be a.
getBaseEntityIdentifier in interface FriendlyURLEntitypublic final java.lang.String getBaseURLTitleEntityIdentifier()
a/b/c 1, where 1 is the sequence number, then the result will be
c.
getBaseURLTitleEntityIdentifier in interface FriendlyURLEntitypublic final java.lang.String getURLTitleEntity()
a/b/c, the result will be c.
getURLTitleEntity in interface FriendlyURLEntitypublic final void setURLTitleIdentifier(java.lang.String urlTitleIdentifier)
setURLTitleIdentifier in interface FriendlyURLEntityMutatorurlTitleIdentifier - The URL title identifier.@Deprecated public final boolean isCurrent()
getReference() == null, as
a friendly URL with a reference is one that redirects to a current one.
isCurrent in interface FriendlyURLEntityTrue when the friendly URL is currently valid, false otherwise.public final boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic final int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||