com.bea.apps.groupspace.content
Class ContentBaseImpl

java.lang.Object
  extended by com.bea.apps.groupspace.content.ContentBaseImpl
All Implemented Interfaces
ContentBase, Serializable
Direct Known Subclasses:
CmBrowserBean, CmBrowserTypelessContent, CommunityContent, FolderBaseImpl

public abstract class ContentBaseImpl
extends Object
implements ContentBase

Copyright (c) 2005-2006 by BEA Systems, Inc. All Rights Reserved.

basic implementation of node wrapper interface; makes the process of getting/setting Property-s of Nodes easier.

See Also
Serialized Form

Field Summary
protected  Node node
          All base attributes will be gotten from the Node
 String typeName
           
 
Constructor Summary
ContentBaseImpl()
           
ContentBaseImpl(Node node)
           
 
Method Summary
static Value[] arrayAsValueArray(String[] strings)
           
 boolean equals(Object that)
           
 String getContentType()
           
 String getCreatedBy()
           
 Calendar getCreatedDate()
           
 ID getCurrentParentFolderId()
           
 ID getDestinationFolderId()
           
 String getDisplayName()
          Returns a display name for the Node; primary property if one exists, name if not.
 com.bea.apps.groupspace.icons.Icon getIcon()
           
 ID getId()
           
 String getModifiedBy()
           
 Calendar getModifiedDate()
           
 String getName()
           
 Node getNode()
           
 String getNodePath()
           
 Property[] getNodeProperties()
          Wrap AuthorizationException and rethrow as RuntimeException so all the get/set methods don'y have to deal with it
 Property getNodeProperty(String pname)
          Wrap AuthorizationException and rethrow as RuntimeException so all the get/set methods don'y have to deal with it
 CommunityContent.NodeType getNodeType()
           
 ID getParentId()
           
protected  String[] getStringValues(String desc)
           
protected  String getValue(String desc)
           
 int hashCode()
          HashCode implementation, important since we're using contains() in Collections
 boolean isContentNode()
           
 boolean isHierarchyNode()
           
 void setCurrentParentFolderId(ID id)
           
 void setDestinationFolderId(ID id)
           
 void setNode(Node node)
           
 void setProperty(String propName, Value newValue)
          Set a single property, but it has to be within the Property [] of the node
 void setProperty(String propName, Value[] newValues)
          Set a single array property, but it has to be within the Property [] of the node
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

node

protected Node node
All base attributes will be gotten from the Node


typeName

public String typeName
Constructor Detail

ContentBaseImpl

public ContentBaseImpl()

ContentBaseImpl

public ContentBaseImpl(Node node)
Method Detail

getNode

public Node getNode()
Specified by:
getNode in interface ContentBase

setNode

public void setNode(Node node)
Specified by:
setNode in interface ContentBase

getContentType

public String getContentType()
Specified by:
getContentType in interface ContentBase

getCreatedBy

public String getCreatedBy()
Specified by:
getCreatedBy in interface ContentBase

getModifiedBy

public String getModifiedBy()
Specified by:
getModifiedBy in interface ContentBase

getCreatedDate

public Calendar getCreatedDate()
Specified by:
getCreatedDate in interface ContentBase

getModifiedDate

public Calendar getModifiedDate()
Specified by:
getModifiedDate in interface ContentBase

getNodePath

public String getNodePath()
Specified by:
getNodePath in interface ContentBase

getNodeType

public CommunityContent.NodeType getNodeType()
Specified by:
getNodeType in interface ContentBase

isHierarchyNode

public boolean isHierarchyNode()
Specified by:
isHierarchyNode in interface ContentBase

isContentNode

public boolean isContentNode()
Specified by:
isContentNode in interface ContentBase

getId

public ID getId()
Specified by:
getId in interface ContentBase

getParentId

public ID getParentId()
Specified by:
getParentId in interface ContentBase

getName

public String getName()
Specified by:
getName in interface ContentBase

getDisplayName

public String getDisplayName()
                      throws RepositoryException
Description copied from interface: ContentBase
Returns a display name for the Node; primary property if one exists, name if not. Intended to be overridden to return something specific for a specialized content type. For example, TITLE in all COMMUNITY_CONTENT

Specified by:
getDisplayName in interface ContentBase
Returns
- string to use for display name
Throws
RepositoryException

getIcon

public com.bea.apps.groupspace.icons.Icon getIcon()
Specified by:
getIcon in interface ContentBase

getDestinationFolderId

public ID getDestinationFolderId()
Specified by:
getDestinationFolderId in interface ContentBase

setDestinationFolderId

public void setDestinationFolderId(ID id)
Specified by:
setDestinationFolderId in interface ContentBase

getCurrentParentFolderId

public ID getCurrentParentFolderId()
Specified by:
getCurrentParentFolderId in interface ContentBase

setCurrentParentFolderId

public void setCurrentParentFolderId(ID id)
Specified by:
setCurrentParentFolderId in interface ContentBase

getNodeProperties

public Property[] getNodeProperties()
Wrap AuthorizationException and rethrow as RuntimeException so all the get/set methods don'y have to deal with it

Specified by:
getNodeProperties in interface ContentBase
Returns

getNodeProperty

public Property getNodeProperty(String pname)
Wrap AuthorizationException and rethrow as RuntimeException so all the get/set methods don'y have to deal with it

Specified by:
getNodeProperty in interface ContentBase
Returns

setProperty

public void setProperty(String propName,
                        Value newValue)
Set a single property, but it has to be within the Property [] of the node

Specified by:
setProperty in interface ContentBase

setProperty

public void setProperty(String propName,
                        Value[] newValues)
Set a single array property, but it has to be within the Property [] of the node

Specified by:
setProperty in interface ContentBase

arrayAsValueArray

public static Value[] arrayAsValueArray(String[] strings)

getValue

protected String getValue(String desc)

getStringValues

protected String[] getStringValues(String desc)

hashCode

public int hashCode()
HashCode implementation, important since we're using contains() in Collections

Overrides:
hashCode in class Object

equals

public boolean equals(Object that)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2006 BEA Systems, Inc. All Rights Reserved