ccc.domain
Class AliasEntity

java.lang.Object
  extended by ccc.domain.Entity
      extended by ccc.domain.ResourceEntity
          extended by ccc.domain.AliasEntity
All Implemented Interfaces:
Lockable, SnapshotSupport<Resource>, Jsonable, java.io.Serializable

public class AliasEntity
extends ResourceEntity

An alias resource. Models a symbolic link that points to another ResourceEntity.

Author:
Civic Computing Ltd
See Also:
Serialized Form

Constructor Summary
protected AliasEntity()
          Constructor: for persistence only.
  AliasEntity(java.lang.String title, ResourceEntity target)
          Constructor.
 
Method Summary
 Alias forCurrentRevision()
          Create a snapshot for the current revision.
 Alias forSpecificRevision(int revNo)
          Create a snapshot for the specified revision.
 Alias forWorkingCopy()
          Create a snapshot for the working copy.
 ResourceType getType()
          Query the type of this resource.
 ResourceEntity target()
          Accessor for the target field.
 void target(ResourceEntity target)
          Mutator for the target field.
 void toJson(Json json)
          Convert to JSON.
 
Methods inherited from class ccc.domain.ResourceEntity
addGroupPermission, addMetadata, addMetadatum, addUserPermission, as, canUnlock, clearGroupAcl, clearMetadata, clearMetadatum, clearUserAcl, computeCache, computeMetadata, computeTemplate, confirmLock, delete, getAbsolutePath, getAcl, getCacheDuration, getChangedBy, getCreatedBy, getDateChanged, getDateCreated, getDescription, getGroupAcl, getIndex, getLockedBy, getMetadata, getMetadatum, getName, getParent, getPublishedBy, getRoot, getTags, getTemplate, getTitle, getUserAcl, isDeleted, isIncludedInMainMenu, isIndexable, isLocked, isPublished, isReadableBy, isSecure, isVisible, isWriteableBy, lock, mapResource, mapResources, publish, setCacheDuration, setDateChanged, setDateCreated, setDescription, setDtoProps, setIncludedInMainMenu, setIndexPosition, setName, setTags, setTemplate, setTitle, undelete, unlock, unpublish
 
Methods inherited from class ccc.domain.Entity
equals, getId, getVersion, hashCode, setId, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AliasEntity

protected AliasEntity()
Constructor: for persistence only.


AliasEntity

public AliasEntity(java.lang.String title,
                   ResourceEntity target)
Constructor.

Parameters:
title - The title for the alias.
target - The target for the alias.
Method Detail

getType

public ResourceType getType()
Query the type of this resource.

Specified by:
getType in class ResourceEntity
Returns:
The ResourceType that describes this resource.

target

public void target(ResourceEntity target)
Mutator for the target field.

Parameters:
target - The new target.

target

public ResourceEntity target()
Accessor for the target field.

Returns:
The current target for this alias.

toJson

public void toJson(Json json)
Convert to JSON.

Specified by:
toJson in interface Jsonable
Overrides:
toJson in class ResourceEntity
Parameters:
json - The JSON object to write to.

forWorkingCopy

public final Alias forWorkingCopy()
Create a snapshot for the working copy.

Returns:
A read-only snapshot of the resource.

forCurrentRevision

public final Alias forCurrentRevision()
Create a snapshot for the current revision.

Returns:
A read-only snapshot of the resource.

forSpecificRevision

public final Alias forSpecificRevision(int revNo)
Create a snapshot for the specified revision.

Parameters:
revNo - The revision to create a snapshot for.
Returns:
A read-only snapshot of the resource.


Copyright © 2010. All Rights Reserved.