com.fullspan.kat.domain.entity
Class KatEntry

java.lang.Object
  extended bycom.fullspan.kat.domain.entity.KatEntity
      extended bycom.fullspan.kat.domain.entity.KatEntry
Direct Known Subclasses:
KatCategory, KatItem

public abstract class KatEntry
extends KatEntity

Base class for kat entries (KatCategory and KatItem).

Version:
$Revision: 1.10 $, $Date: 2005/03/13 02:02:57 $
Author:
Mitch Stuart

Field Summary
static int CONTENT_MAX_LEN
           
static int ENTRY_LEVEL_MAX
           
protected static java.text.NumberFormat ENTRY_PATH_ID_FORMATTER
           
static int ENTRY_PATH_PART_LEN
           
static java.lang.String ENTRY_PATH_PART_SEPARATOR
           
static int ENTRY_TYPE_CATEGORY
           
static int ENTRY_TYPE_ITEM
           
static java.util.Set ENTRY_TYPE_SET
           
protected static int[] ENTRY_TYPE_VALUES
           
protected  int m_computedVisibility
           
protected  java.lang.String m_content
           
protected  java.util.Date m_editTime
           
protected  int m_entryLevel
           
protected  java.lang.String m_entryPath
           
protected  int m_entryType
           
protected  java.lang.String m_name
           
protected  KatUser m_ownerUser
           
protected  java.lang.Long m_ownerUserid
           
protected  java.lang.Long m_parentCatid
           
protected  java.lang.String m_parentPath
           
protected  int m_visibility
           
static int NAME_MAX_LEN
           
static java.util.List NON_ROOT_VISIBILITY_OPTIONS
           
protected static int[] NON_ROOT_VISIBILITY_VALUES
           
static java.util.List ROOT_VISIBILITY_OPTIONS
           
protected static int[] ROOT_VISIBILITY_VALUES
           
static int VISIBILITY_INHERIT
           
static int VISIBILITY_PRIVATE
           
static int VISIBILITY_PUBLIC
           
 
Fields inherited from class com.fullspan.kat.domain.entity.KatEntity
PROPNAME_CREATE_TIME, PROPNAME_UPDATE_TIME, UPDATE_VERSION_UNSAVED
 
Constructor Summary
KatEntry()
           
 
Method Summary
 void computeAndSetEntryPath()
           
static java.lang.String computeEntryPath(java.lang.String parentPath, java.lang.Long id)
           
static java.lang.String formatIdForPath(java.lang.Long id)
           
 int getComputedVisibility()
           
 java.lang.String getContent()
           
 java.util.Date getEditTime()
           
 int getEntryLevel()
           
 java.lang.String getEntryPath()
           
 int getEntryType()
           
 boolean getIsCategory()
           
 boolean getIsCategoryNonRoot()
           
 boolean getIsItem()
           
 boolean getIsPersistentCatNonRoot()
           
 boolean getIsPrivate()
           
 boolean getIsRootCategory()
           
 boolean getIsUserOwner(KatUser user)
           
 java.lang.String getName()
           
static java.util.List getNonRootVisibilityOptions()
          Get the valid visibility values and names.
 KatUser getOwnerUser()
           
 java.lang.Long getOwnerUserid()
           
 java.lang.Long getParentCatid()
           
 java.lang.String getParentPath()
           
static java.util.List getRootVisibilityOptions()
          Get the valid visibility values and names.
 int getVisibility()
           
static java.util.List getVisibilityOptions(boolean forRootCategory)
          Get the valid visibility values and names.
static boolean isValidVisibility(boolean forRootCategory, int visibility)
           
static KatEntry newInstance(int entryType)
           
 void setComputedVisibility(int computedVisibility)
           
 void setContent(java.lang.String content)
           
 void setEditTime(java.util.Date editTime)
           
 void setEntryLevel(int entryLevel)
           
 void setEntryPath(java.lang.String entryPath)
           
 void setEntryType(int entryType)
           
 void setName(java.lang.String name)
           
 void setOwnerUser(KatUser ownerUser)
           
 void setOwnerUserid(java.lang.Long ownerUserid)
           
 void setParentCatid(java.lang.Long parentCatid)
           
 void setParentPath(java.lang.String parentPath)
           
 void setVisibility(int visibility)
           
 
Methods inherited from class com.fullspan.kat.domain.entity.KatEntity
getCreateTime, getId, getIsNew, getIsPersistent, getIsSameEntity, getUpdateTime, getUpdateVersion, setCreateTime, setId, setUpdateTime, setUpdateVersion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENTRY_LEVEL_MAX

public static final int ENTRY_LEVEL_MAX
See Also:
Constant Field Values

NAME_MAX_LEN

public static final int NAME_MAX_LEN
See Also:
Constant Field Values

CONTENT_MAX_LEN

public static final int CONTENT_MAX_LEN
See Also:
Constant Field Values

ENTRY_PATH_PART_SEPARATOR

public static final java.lang.String ENTRY_PATH_PART_SEPARATOR
See Also:
Constant Field Values

ENTRY_PATH_PART_LEN

public static final int ENTRY_PATH_PART_LEN
See Also:
Constant Field Values

ENTRY_PATH_ID_FORMATTER

protected static final java.text.NumberFormat ENTRY_PATH_ID_FORMATTER

ENTRY_TYPE_CATEGORY

public static final int ENTRY_TYPE_CATEGORY
See Also:
Constant Field Values

ENTRY_TYPE_ITEM

public static final int ENTRY_TYPE_ITEM
See Also:
Constant Field Values

ENTRY_TYPE_VALUES

protected static final int[] ENTRY_TYPE_VALUES

ENTRY_TYPE_SET

public static final java.util.Set ENTRY_TYPE_SET

VISIBILITY_PUBLIC

public static final int VISIBILITY_PUBLIC
See Also:
Constant Field Values

VISIBILITY_INHERIT

public static final int VISIBILITY_INHERIT
See Also:
Constant Field Values

VISIBILITY_PRIVATE

public static final int VISIBILITY_PRIVATE
See Also:
Constant Field Values

ROOT_VISIBILITY_VALUES

protected static final int[] ROOT_VISIBILITY_VALUES

NON_ROOT_VISIBILITY_VALUES

protected static final int[] NON_ROOT_VISIBILITY_VALUES

ROOT_VISIBILITY_OPTIONS

public static final java.util.List ROOT_VISIBILITY_OPTIONS

NON_ROOT_VISIBILITY_OPTIONS

public static final java.util.List NON_ROOT_VISIBILITY_OPTIONS

m_ownerUserid

protected java.lang.Long m_ownerUserid

m_ownerUser

protected KatUser m_ownerUser

m_parentCatid

protected java.lang.Long m_parentCatid

m_entryPath

protected java.lang.String m_entryPath

m_parentPath

protected java.lang.String m_parentPath

m_entryLevel

protected int m_entryLevel

m_visibility

protected int m_visibility

m_computedVisibility

protected int m_computedVisibility

m_entryType

protected int m_entryType

m_editTime

protected java.util.Date m_editTime

m_name

protected java.lang.String m_name

m_content

protected java.lang.String m_content
Constructor Detail

KatEntry

public KatEntry()
Method Detail

getVisibilityOptions

public static java.util.List getVisibilityOptions(boolean forRootCategory)
Get the valid visibility values and names.

Returns:
a list of StringPairs containing the valid visibilities. For each StringPair, the first property is the visibility value, and the second property is the visibility name.

getRootVisibilityOptions

public static java.util.List getRootVisibilityOptions()
Get the valid visibility values and names.

Returns:
a list of StringPairs containing the valid visibilities for the root category. For each StringPair, the first property is the visibility value, and the second property is the visibility name.

getNonRootVisibilityOptions

public static java.util.List getNonRootVisibilityOptions()
Get the valid visibility values and names.

Returns:
a list of StringPairs containing the valid visibilities for all entries other than the root category. For each StringPair, the first property is the visibility value, and the second property is the visibility name.

isValidVisibility

public static boolean isValidVisibility(boolean forRootCategory,
                                        int visibility)

formatIdForPath

public static java.lang.String formatIdForPath(java.lang.Long id)

computeEntryPath

public static java.lang.String computeEntryPath(java.lang.String parentPath,
                                                java.lang.Long id)

newInstance

public static KatEntry newInstance(int entryType)

getComputedVisibility

public int getComputedVisibility()

setComputedVisibility

public void setComputedVisibility(int computedVisibility)

getContent

public java.lang.String getContent()

setContent

public void setContent(java.lang.String content)

getEditTime

public java.util.Date getEditTime()

setEditTime

public void setEditTime(java.util.Date editTime)

getEntryLevel

public int getEntryLevel()

setEntryLevel

public void setEntryLevel(int entryLevel)

getEntryType

public int getEntryType()

setEntryType

public void setEntryType(int entryType)

getName

public java.lang.String getName()

setName

public void setName(java.lang.String name)

getOwnerUser

public KatUser getOwnerUser()

setOwnerUser

public void setOwnerUser(KatUser ownerUser)

getOwnerUserid

public java.lang.Long getOwnerUserid()

setOwnerUserid

public void setOwnerUserid(java.lang.Long ownerUserid)

getParentCatid

public java.lang.Long getParentCatid()

setParentCatid

public void setParentCatid(java.lang.Long parentCatid)

getParentPath

public java.lang.String getParentPath()

setParentPath

public void setParentPath(java.lang.String parentPath)

getEntryPath

public java.lang.String getEntryPath()

setEntryPath

public void setEntryPath(java.lang.String entryPath)

getVisibility

public int getVisibility()

setVisibility

public void setVisibility(int visibility)

getIsCategory

public boolean getIsCategory()

getIsItem

public boolean getIsItem()

getIsRootCategory

public boolean getIsRootCategory()

getIsCategoryNonRoot

public boolean getIsCategoryNonRoot()

getIsPersistentCatNonRoot

public boolean getIsPersistentCatNonRoot()

getIsPrivate

public boolean getIsPrivate()

computeAndSetEntryPath

public void computeAndSetEntryPath()

getIsUserOwner

public boolean getIsUserOwner(KatUser user)