Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.portal.core.impl.model.portal
Class PortalObjectImpl

    java.lang.Object
      org.jboss.portal.core.impl.model.portal.PortalObjectImpl

All Implemented Interfaces:
  java.lang.Comparable, PortalObject

Direct Known Subclasses:
  ContextImpl, PageImpl, PortalImpl, WindowImpl

    public abstract class PortalObjectImpl

extends java.lang.Object
implements PortalObject

Version:
  $Revision: 11820 $
Author:
  Julien Viet

Field Summary
`protected static int` | `ALL_TYPES_MASK` .
`protected static org.apache.log4j.Logger` | `log` The logger.

Fields inherited from interface org.jboss.portal.core.model.portal.PortalObject
`CONTEXT_MASK, DEFAULT_OBJECT_NAME, PAGE_MASK, PORTAL_MASK, PORTAL_PROP_DEFAULT_OBJECT_NAME, TYPE_CONTEXT, TYPE_PAGE, TYPE_PORTAL, TYPE_WINDOW, WINDOW_MASK`

Constructor Summary
`PortalObjectImpl()`
`PortalObjectImpl(boolean initState)`

Method Summary
`protected void` | `addChild(java.lang.String name, PortalObjectImpl childObject)`
`protected abstract PortalObjectImpl` | `cloneObject()`
`int` | `compareTo(java.lang.Object o)`
`PortalObject` | `copy(PortalObject parent, java.lang.String name, boolean deep)` Copy the portal object as a child of the specified object.
`protected void` | `destroy()` Overridable callback.
`void` | `destroyChild(java.lang.String name)` Destroy an existing child.
`boolean` | `equals(java.lang.Object obj)`
`PortalObject` | `getChild(java.lang.String name)` Return a specific child object or null if it does not exist.
`
`<T extends PortalObject> T`
` | `getChild(java.lang.String name, java.lang.Class<T> expectedType)` Returns the child of the specified type and with the given name or `null` if it cannot be found.
`java.util.Collection` | `getChildren()` Return all the children of this object.
`java.util.Collection` | `getChildren(int wantedMask)` Return all the children of this object filtered with a particular mask.
`java.util.Map<java.lang.String,java.lang.String>` | `getDeclaredProperties()` Return a map that contains the object declared properties.
`java.lang.String` | `getDeclaredProperty(java.lang.String name)` Return a property declared on that object.
`java.util.Map<java.lang.String,java.lang.String>` | `getDeclaredPropertyMap()`
`protected PortalObject` | `getDefaultChild()` Return the default child of this object based on the declared property that specifies the default object name.
`org.jboss.portal.common.i18n.LocalizedString` | `getDisplayName()` Return the localized string used to represent that object.
`java.util.Map` | `getDisplayNames()`
`PortalObjectId` | `getId()` Return the object id unique in the scope of its container.
`java.lang.Long` | `getKey()`
`java.lang.String` | `getListener()` Returns the listener id or null if there is none.
`protected int` | `getMask()`
`protected int` | `getMask(int portalObjectType)` Returns the mask for this kind of object.
`java.lang.String` | `getName()` Return the object name unique in the scope of its parent.
`ObjectNode` | `getObjectNode()`
`PortalObject` | `getParent()` Return the parent object.
`java.util.Map` | `getProperties()` Get the aggregated properties in a lazy manner.
`java.lang.String` | `getProperty(java.lang.String name)` Return a property of that object.
`abstract int` | `getType()` Returns the type of the object which is a value that discriminates the object type.
`int` | `hashCode()`
`void` | `setDeclaredProperty(java.lang.String name, java.lang.String value)` Update a property declared on that object.
`void` | `setDeclaredPropertyMap(java.util.Map<java.lang.String,java.lang.String> properties)`
`void` | `setDisplayName(org.jboss.portal.common.i18n.LocalizedString displayName)` Set the localized string used to represent that object.
`void` | `setDisplayNames(java.util.Map displayNames)`
`void` | `setKey(java.lang.Long key)`
`void` | `setListener(java.lang.String listener)` Set a listener id.
`void` | `setObjectNode(ObjectNode objectNode)`
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

Field Detail

### log

    protected static final org.apache.log4j.Logger log

  The logger.

### ALL_TYPES_MASK

    protected static final int ALL_TYPES_MASK

  .

  See Also:
    Constant Field Values

Constructor Detail

### PortalObjectImpl

    public PortalObjectImpl()

### PortalObjectImpl

    public PortalObjectImpl(boolean initState)

Method Detail

### getKey

    public java.lang.Long getKey()

### setKey

    public void setKey(java.lang.Long key)

### getObjectNode

    public ObjectNode getObjectNode()

### setObjectNode

    public void setObjectNode(ObjectNode objectNode)

### getId

    public PortalObjectId getId()

  Description copied from interface: `PortalObject`
  Return the object id unique in the scope of its container.

  Specified by:
    `getId` in interface `PortalObject`
  Returns:
    the object id

### compareTo

    public int compareTo(java.lang.Object o)

  Specified by:
    `compareTo` in interface `java.lang.Comparable`

### destroyChild

    public void destroyChild(java.lang.String name)
                      throws NoSuchPortalObjectException

  Description copied from interface: `PortalObject`
  Destroy an existing child.

  Specified by:
    `destroyChild` in interface `PortalObject`
  Parameters:
    `name` - the child name
  Throws:
    `NoSuchPortalObjectException` - if the child does not exist

### getName

    public java.lang.String getName()

  Description copied from interface: `PortalObject`
  Return the object name unique in the scope of its parent.

  Specified by:
    `getName` in interface `PortalObject`
  Returns:
    the object name

### setDisplayNames

    public void setDisplayNames(java.util.Map displayNames)

### getDisplayNames

    public java.util.Map getDisplayNames()

### setDisplayName

    public void setDisplayName(org.jboss.portal.common.i18n.LocalizedString displayName)

  Description copied from interface: `PortalObject`
  Set the localized string used to represent that object.

  Specified by:
    `setDisplayName` in interface `PortalObject`
  Parameters:
    `displayName` - the localized display name

### getDisplayName

    public org.jboss.portal.common.i18n.LocalizedString getDisplayName()

  Description copied from interface: `PortalObject`
  Return the localized string used to represent that object.

  Specified by:
    `getDisplayName` in interface `PortalObject`
  Returns:
    the localized display name

### copy

    public PortalObject copy(PortalObject parent,
                             java.lang.String name,
                             boolean deep)
                      throws DuplicatePortalObjectException,
                             java.lang.IllegalArgumentException

  Description copied from interface: `PortalObject`
  Copy the portal object as a child of the specified object.

  Specified by:
    `copy` in interface `PortalObject`
  Parameters:
    `parent` - the parent of the copy
    `name` - the name of the child
    `deep` - true copies recursively children
  Returns:
    the newly created node child of the specified parent
  Throws:
    `DuplicatePortalObjectException` - if the specified parent has already a node with such a name
    `java.lang.IllegalArgumentException` - if the specified parent is null

### getChildren

    public java.util.Collection getChildren()

  Description copied from interface: `PortalObject`
  Return all the children of this object.

  Specified by:
    `getChildren` in interface `PortalObject`
  Returns:
    the children

### getChildren

    public java.util.Collection getChildren(int wantedMask)

  Description copied from interface: `PortalObject`
  Return all the children of this object filtered with a particular mask.

  Specified by:
    `getChildren` in interface `PortalObject`
  Returns:
    the children

### getListener

    public java.lang.String getListener()

  Description copied from interface: `PortalObject`
  Returns the listener id or null if there is none.

  Specified by:
    `getListener` in interface `PortalObject`
  Returns:
    the listener

### setListener

    public void setListener(java.lang.String listener)

  Description copied from interface: `PortalObject`
  Set a listener id.

  Specified by:
    `setListener` in interface `PortalObject`
  Parameters:
    `listener` - the listener id

### getParent

    public PortalObject getParent()

  Description copied from interface: `PortalObject`
  Return the parent object.

  Specified by:
    `getParent` in interface `PortalObject`
  Returns:
    the parent object.

### getChild

    public PortalObject getChild(java.lang.String name)

  Description copied from interface: `PortalObject`
  Return a specific child object or null if it does not exist.

  Specified by:
    `getChild` in interface `PortalObject`
  Returns:
    a child object.

### getChild

    public <T extends PortalObject> T getChild(java.lang.String name,
                                               java.lang.Class<T> expectedType)

  Description copied from interface: `PortalObject`
  Returns the child of the specified type and with the given name or `null` if it cannot be found.

  Specified by:
    `getChild` in interface `PortalObject`
  Type Parameters:
    `T` - a class extending PortalObject
  Parameters:
    `name` - the child's name
    `expectedType` - the expected type of the child to be retrieved
  Returns:
    the named child or `null` if it cannot be found

### getProperties

    public java.util.Map getProperties()

  Get the aggregated properties in a lazy manner.

  Specified by:
    `getProperties` in interface `PortalObject`
  Returns:
    a map of the object properties

### getDeclaredPropertyMap

    public java.util.Map<java.lang.String,java.lang.String> getDeclaredPropertyMap()

### setDeclaredPropertyMap

    public void setDeclaredPropertyMap(java.util.Map<java.lang.String,java.lang.String> properties)

### getDeclaredProperties

    public java.util.Map<java.lang.String,java.lang.String> getDeclaredProperties()

  Description copied from interface: `PortalObject`
  Return a map that contains the object declared properties.

  Specified by:
    `getDeclaredProperties` in interface `PortalObject`
  Returns:
    a map of the properties declared by the object

### getDeclaredProperty

    public java.lang.String getDeclaredProperty(java.lang.String name)

  Description copied from interface: `PortalObject`
  Return a property declared on that object.

  Specified by:
    `getDeclaredProperty` in interface `PortalObject`
  Returns:
    the property value

### setDeclaredProperty

    public void setDeclaredProperty(java.lang.String name,
                                    java.lang.String value)

  Description copied from interface: `PortalObject`
  Update a property declared on that object.

  Specified by:
    `setDeclaredProperty` in interface `PortalObject`
  Parameters:
    `name` - the property name
    `value` - the property value

### getProperty

    public java.lang.String getProperty(java.lang.String name)

  Description copied from interface: `PortalObject`
  Return a property of that object.

  Specified by:
    `getProperty` in interface `PortalObject`
  Returns:
    the property value

### getType

    public abstract int getType()

  Description copied from interface: `PortalObject`
  Returns the type of the object which is a value that discriminates the object type.

  Specified by:
    `getType` in interface `PortalObject`
  Returns:
    the object type.

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### equals

    public boolean equals(java.lang.Object obj)

  Overrides:
    `equals` in class `java.lang.Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### getDefaultChild

    protected PortalObject getDefaultChild()

  Return the default child of this object based on the declared property that specifies the default object name.

### cloneObject

    protected abstract PortalObjectImpl cloneObject()

### destroy

    protected void destroy()

  Overridable callback.

### getMask

    protected final int getMask()

### getMask

    protected final int getMask(int portalObjectType)

  Returns the mask for this kind of object.

### addChild

    protected final void addChild(java.lang.String name,
                                  PortalObjectImpl childObject)
                           throws DuplicatePortalObjectException,
                                  java.lang.IllegalArgumentException

  Throws:
    `DuplicatePortalObjectException`
    `java.lang.IllegalArgumentException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD