com.dotmarketing.beans
Class Inode

java.lang.Object
  extended by com.dotmarketing.beans.Inode
All Implemented Interfaces:
UUIDable, Permissionable, Versionable, Categorizable, java.io.Serializable, java.lang.Comparable
Direct Known Subclasses:
Campaign, Category, Click, Communication, Field, FileUpload, Folder, MailingList, Recipient, Relationship, Report, ReportParameter, Structure, UserComment, UserFilter, UserProxy, VirtualLink, WebAsset

public class Inode
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable, Permissionable, Versionable, Categorizable, UUIDable

Author:
rocco, David H Torres (2009)
See Also:
Serialized Form

Field Summary
protected  java.lang.String identifier
           
protected  java.lang.String inode
           
protected  java.lang.String owner
           
 
Constructor Summary
Inode()
           
 
Method Summary
 java.util.List<PermissionSummary> acceptedPermissions()
          Returns the list of accepted permission of this permissionable (I.E.
 void addChild(Identifier i)
           
 void addChild(Identifier i, java.lang.String relationType)
           
 void addChild(Inode i)
          Deprecated. Association between inodes should be called through their respective API, calling the API ensures the consistency of the relationship and caches
 void addChild(Inode i, java.lang.String relationType)
          Deprecated. Association between inodes should be called through their respective API, calling the API ensures the consistency of the relationship and caches
 void addChild(Inode i, java.lang.String relationType, int sortOrder)
          Deprecated. Association between inodes should be called through their respective API, calling the API ensures the consistency of the relationship and caches
 void addParent(Identifier i)
           
 void addParent(Inode i)
          Deprecated. Association between inodes should be called through their respective API, calling the API ensures the consistency of the relationship and caches
 void addParent(Inode i, java.lang.String relationType)
          Deprecated. Association between inodes should be called through their respective API, calling the API ensures the consistency of the relationship and caches
 int compareTo(java.lang.Object compObject)
           
 boolean deleteChild(Identifier child)
           
 boolean deleteChild(Identifier child, java.lang.String relationType)
           
 boolean deleteChild(Inode child)
          Deprecated. Association between inodes should be called through their respective API, calling the API ensures the consistency of the relationship and caches
 boolean deleteChild(Inode child, java.lang.String relationType)
          Deprecated. Association between inodes should be called through their respective API, calling the API ensures the consistency of the relationship and caches
 boolean deleteParent(Inode parent)
          Deprecated. Association between inodes should be called through their respective API, calling the API ensures the consistency of the relationship and caches
 boolean deleteParent(Inode parent, java.lang.String relationType)
          Deprecated. Association between inodes should be called through their respective API, calling the API ensures the consistency of the relationship and caches
 boolean equals(java.lang.Object other)
           
 java.lang.String getCategoryId()
           
 java.util.Date getiDate()
           
 java.util.Date getIDate()
          Returns the iDate.
 java.lang.String getIdentifier()
           
 java.lang.String getInode()
          gets the inode (specific version id) of the versionable
 java.util.Map<java.lang.String,java.lang.Object> getMap()
          Returns a hashmap with all the inode fields
 java.util.Date getModDate()
          returns the timestamp of when the last modification was made
 java.lang.String getModUser()
          returns user who last modified the version
 java.lang.String getOwner()
          Returns the owner.
 Permissionable getParentPermissionable()
          Retrieves the parent permissionable in the chain of permissions inheritance
 java.lang.String getPermissionId()
          Sets the id to be used for checking permissions
 java.lang.String getPermissionType()
          Returns the permission type which this permissionable can inherit from
 java.lang.String getTitle()
          returns the title of the specific asset
 java.lang.String getType()
          Returns the type.
 java.lang.String getVersionId()
          The VersionId is the identifier of the versionable web asset every version of the particular webasset will share the same versionId/Identifier
 java.lang.String getVersionType()
          this returns the string "type" (the db table) of the versionable web asset.
 boolean hasChildren()
           
 int hashCode()
           
 boolean hasParents()
           
 boolean isArchived()
          returns if the asset is archived or not
 boolean isLive()
          returns if the asset is live or not
 boolean isLocked()
          returns if the asset is locked or not
 boolean isNew()
           
 boolean isParentPermissionable()
          Returns true if other asset could inherit permissions from it
 boolean isWorking()
          returns if the asset is working or not
 java.util.List<RelatedPermissionableGroup> permissionDependencies(int requiredPermission)
          Based on the given required permission bit, this method should return the list of dependencies that should be check as well on related permissionables before grant the requiredPermission
 void setiDate(java.util.Date iDate)
           
 void setIDate(java.util.Date iDate)
          Sets the iDate.
 void setIDate(java.lang.String x)
           
 void setIdentifier(java.lang.String identifier)
           
 void setInode(java.lang.String inode)
          Sets the inode.
 void setOwner(java.lang.String owner)
          Sets the owner.
 void setParents(java.util.List newParents)
          Deprecated. Association between inodes should be called through their respective API, calling the API ensures the consistency of the relationship and caches
 void setType(java.lang.String type)
          Sets the type.
 void setVersionId(java.lang.String versionId)
          sets the versionId (identifier) of the asset
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

owner

protected java.lang.String owner

inode

protected java.lang.String inode

identifier

protected java.lang.String identifier
Constructor Detail

Inode

public Inode()
Method Detail

getModDate

public java.util.Date getModDate()
Description copied from interface: Versionable
returns the timestamp of when the last modification was made

Specified by:
getModDate in interface Versionable
Returns:

getModUser

public java.lang.String getModUser()
Description copied from interface: Versionable
returns user who last modified the version

Specified by:
getModUser in interface Versionable
Returns:

getCategoryId

public java.lang.String getCategoryId()
Specified by:
getCategoryId in interface Categorizable

setIDate

public void setIDate(java.util.Date iDate)
Sets the iDate.

Parameters:
iDate - The iDate to set

setIDate

public void setIDate(java.lang.String x)

getIDate

public java.util.Date getIDate()
Returns the iDate.

Returns:
java.util.Date

setInode

public void setInode(java.lang.String inode)
Sets the inode.

Specified by:
setInode in interface UUIDable
Parameters:
inode - The inode to set

getInode

public java.lang.String getInode()
Description copied from interface: Versionable
gets the inode (specific version id) of the versionable

Specified by:
getInode in interface UUIDable
Specified by:
getInode in interface Versionable

getIdentifier

public java.lang.String getIdentifier()
Returns:
Returns the identifier.

setIdentifier

public void setIdentifier(java.lang.String identifier)
Parameters:
identifier - The identifier to set.

setOwner

public void setOwner(java.lang.String owner)
Sets the owner.

Specified by:
setOwner in interface Permissionable
Parameters:
owner - The owner to set

getOwner

public java.lang.String getOwner()
Returns the owner.

Specified by:
getOwner in interface Permissionable
Returns:
int

setType

public void setType(java.lang.String type)
Sets the type.

Parameters:
type - The type to set

getType

public java.lang.String getType()
Returns the type.

Returns:
String

addChild

public void addChild(Inode i)
Deprecated. Association between inodes should be called through their respective API, calling the API ensures the consistency of the relationship and caches


addChild

public void addChild(Identifier i)

addChild

public void addChild(Inode i,
                     java.lang.String relationType)
Deprecated. Association between inodes should be called through their respective API, calling the API ensures the consistency of the relationship and caches


addChild

public void addChild(Identifier i,
                     java.lang.String relationType)

addChild

public void addChild(Inode i,
                     java.lang.String relationType,
                     int sortOrder)
Deprecated. Association between inodes should be called through their respective API, calling the API ensures the consistency of the relationship and caches


addParent

public void addParent(Inode i)
Deprecated. Association between inodes should be called through their respective API, calling the API ensures the consistency of the relationship and caches


addParent

public void addParent(Identifier i)

addParent

public void addParent(Inode i,
                      java.lang.String relationType)
Deprecated. Association between inodes should be called through their respective API, calling the API ensures the consistency of the relationship and caches


deleteChild

public boolean deleteChild(Inode child)
Deprecated. Association between inodes should be called through their respective API, calling the API ensures the consistency of the relationship and caches

Remove the ASSOCIATION between a child and the inode

Parameters:
child - child to be dissociated
Returns:

deleteChild

public boolean deleteChild(Identifier child)

deleteChild

public boolean deleteChild(Inode child,
                           java.lang.String relationType)
Deprecated. Association between inodes should be called through their respective API, calling the API ensures the consistency of the relationship and caches

Remove the ASSOCIATION between a child and the inode

Parameters:
child - child to be dissociated
Returns:

deleteChild

public boolean deleteChild(Identifier child,
                           java.lang.String relationType)

deleteParent

public boolean deleteParent(Inode parent)
Deprecated. Association between inodes should be called through their respective API, calling the API ensures the consistency of the relationship and caches

Remove the ASSOCIATION between a parent and the inode

Parameters:
parent - parent to be dissociated
Returns:

deleteParent

public boolean deleteParent(Inode parent,
                            java.lang.String relationType)
Deprecated. Association between inodes should be called through their respective API, calling the API ensures the consistency of the relationship and caches


setParents

public void setParents(java.util.List newParents)
Deprecated. Association between inodes should be called through their respective API, calling the API ensures the consistency of the relationship and caches

Wipe out the old parents and associate a new parents set to the inode

Parameters:
newChildren - New children set

hasChildren

public boolean hasChildren()
Returns:
If the inode has children return true, false otherwise

hasParents

public boolean hasParents()
Returns:
If the inode has children return true, false otherwise

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getiDate

public java.util.Date getiDate()

setiDate

public void setiDate(java.util.Date iDate)

isNew

public boolean isNew()

getMap

public java.util.Map<java.lang.String,java.lang.Object> getMap()
                                                        throws DotStateException,
                                                               DotDataException,
                                                               DotSecurityException
Returns a hashmap with all the inode fields

Returns:
the map
Throws:
DotStateException
DotDataException
DotSecurityException

compareTo

public int compareTo(java.lang.Object compObject)
Specified by:
compareTo in interface java.lang.Comparable

getPermissionId

public java.lang.String getPermissionId()
Description copied from interface: Permissionable
Sets the id to be used for checking permissions

Specified by:
getPermissionId in interface Permissionable
Returns:

acceptedPermissions

public java.util.List<PermissionSummary> acceptedPermissions()
Description copied from interface: Permissionable
Returns the list of accepted permission of this permissionable (I.E. content accepts permissions to view, edit, publish, and edit permissions)

Specified by:
acceptedPermissions in interface Permissionable
Returns:

permissionDependencies

public java.util.List<RelatedPermissionableGroup> permissionDependencies(int requiredPermission)
Description copied from interface: Permissionable
Based on the given required permission bit, this method should return the list of dependencies that should be check as well on related permissionables before grant the requiredPermission

Specified by:
permissionDependencies in interface Permissionable
Returns:

getParentPermissionable

public Permissionable getParentPermissionable()
                                       throws DotDataException
Description copied from interface: Permissionable
Retrieves the parent permissionable in the chain of permissions inheritance

Specified by:
getParentPermissionable in interface Permissionable
Returns:
Throws:
DotDataException

getPermissionType

public java.lang.String getPermissionType()
Description copied from interface: Permissionable
Returns the permission type which this permissionable can inherit from

Specified by:
getPermissionType in interface Permissionable
Returns:

isParentPermissionable

public boolean isParentPermissionable()
Description copied from interface: Permissionable
Returns true if other asset could inherit permissions from it

Specified by:
isParentPermissionable in interface Permissionable
Returns:

getTitle

public java.lang.String getTitle()
Description copied from interface: Versionable
returns the title of the specific asset

Specified by:
getTitle in interface Versionable
Returns:

getVersionId

public java.lang.String getVersionId()
Description copied from interface: Versionable
The VersionId is the identifier of the versionable web asset every version of the particular webasset will share the same versionId/Identifier

Specified by:
getVersionId in interface Versionable
Returns:

getVersionType

public java.lang.String getVersionType()
Description copied from interface: Versionable
this returns the string "type" (the db table) of the versionable web asset. Contentlet will return 'Contentlet' Folder will return folder HTMLPage will return htmlpage Template will return template File will return file_asset Link will return links Container will return containers

Specified by:
getVersionType in interface Versionable
Returns:

isArchived

public boolean isArchived()
                   throws DotStateException,
                          DotDataException,
                          DotSecurityException
Description copied from interface: Versionable
returns if the asset is archived or not

Specified by:
isArchived in interface Versionable
Returns:
Throws:
DotStateException
DotDataException
DotSecurityException

isLive

public boolean isLive()
               throws DotStateException,
                      DotDataException,
                      DotSecurityException
Description copied from interface: Versionable
returns if the asset is live or not

Specified by:
isLive in interface Versionable
Returns:
Throws:
DotStateException
DotDataException
DotSecurityException

isLocked

public boolean isLocked()
                 throws DotStateException,
                        DotDataException,
                        DotSecurityException
Description copied from interface: Versionable
returns if the asset is locked or not

Specified by:
isLocked in interface Versionable
Returns:
Throws:
DotStateException
DotDataException
DotSecurityException

isWorking

public boolean isWorking()
                  throws DotStateException,
                         DotDataException,
                         DotSecurityException
Description copied from interface: Versionable
returns if the asset is working or not

Specified by:
isWorking in interface Versionable
Returns:
Throws:
DotStateException
DotDataException
DotSecurityException

setVersionId

public void setVersionId(java.lang.String versionId)
Description copied from interface: Versionable
sets the versionId (identifier) of the asset

Specified by:
setVersionId in interface Versionable


Copyright © 2013 dotCMS Inc. All Rights Reserved.