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.model.portal
Interface PortalObject

All Superinterfaces:
  java.lang.Comparable

All Known Subinterfaces:
  Context, Page, PageContainer, Portal, PortalContainer, Window

All Known Implementing Classes:
  ContextImpl, DashboardContext, PageImpl, PortalImpl, PortalObjectImpl, WindowImpl

    public interface PortalObject

extends java.lang.Comparable

The base interface for all portal objects.

Version:
  $Revision: 10589 $
Author:
  Julien Viet

Field Summary
`static int` | `CONTEXT_MASK` .
`static java.lang.String` | `DEFAULT_OBJECT_NAME` The default portal name.
`static int` | `PAGE_MASK` .
`static int` | `PORTAL_MASK` .
`static java.lang.String` | `PORTAL_PROP_DEFAULT_OBJECT_NAME` Portal property name that indicates the name of the default portal to lookup.
`static int` | `TYPE_CONTEXT` .
`static int` | `TYPE_PAGE` .
`static int` | `TYPE_PORTAL` .
`static int` | `TYPE_WINDOW` .
`static int` | `WINDOW_MASK` .

Method Summary
`PortalObject` | `copy(PortalObject parent, java.lang.String name, boolean deep)` Copy the portal object as a child of the specified object.
`void` | `destroyChild(java.lang.String name)` Destroy an existing child.
`PortalObject` | `getChild(java.lang.String name)` Return a specific child object or null if it does not exist.
`java.util.Collection<PortalObject>` | `getChildren()` Return all the children of this object.
`java.util.Collection<PortalObject>` | `getChildren(int mask)` Return all the children of this object filtered with a particular mask.
`java.util.Map` | `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.
`LocalizedString` | `getDisplayName()` Return the localized string used to represent that object.
`PortalObjectId` | `getId()` Return the object id unique in the scope of its container.
`java.lang.String` | `getListener()` Returns the listener id or null if there is none.
`java.lang.String` | `getName()` Return the object name unique in the scope of its parent.
`PortalObject` | `getParent()` Return the parent object.
`java.util.Map` | `getProperties()` Returns a read only map that contains the object properties.
`java.lang.String` | `getProperty(java.lang.String name)` Return a property of that object.
`int` | `getType()` Returns the type of the object which is a value that discriminates the object type.
`void` | `setDeclaredProperty(java.lang.String name, java.lang.String value)` Update a property declared on that object.
`void` | `setDisplayName(LocalizedString localizedString)` Set the localized string used to represent that object.
`void` | `setListener(java.lang.String listener)` Set a listener id.

Methods inherited from interface java.lang.Comparable
`compareTo`

Field Detail

### PORTAL_PROP_DEFAULT_OBJECT_NAME

    static final java.lang.String PORTAL_PROP_DEFAULT_OBJECT_NAME

  Portal property name that indicates the name of the default portal to lookup.

  See Also:
    Constant Field Values

### DEFAULT_OBJECT_NAME

    static final java.lang.String DEFAULT_OBJECT_NAME

  The default portal name.

  See Also:
    Constant Field Values

### TYPE_CONTEXT

    static final int TYPE_CONTEXT

  .

  See Also:
    Constant Field Values

### TYPE_PORTAL

    static final int TYPE_PORTAL

  .

  See Also:
    Constant Field Values

### TYPE_PAGE

    static final int TYPE_PAGE

  .

  See Also:
    Constant Field Values

### TYPE_WINDOW

    static final int TYPE_WINDOW

  .

  See Also:
    Constant Field Values

### CONTEXT_MASK

    static final int CONTEXT_MASK

  .

  See Also:
    Constant Field Values

### PORTAL_MASK

    static final int PORTAL_MASK

  .

  See Also:
    Constant Field Values

### PAGE_MASK

    static final int PAGE_MASK

  .

  See Also:
    Constant Field Values

### WINDOW_MASK

    static final int WINDOW_MASK

  .

  See Also:
    Constant Field Values

Method Detail

### getId

    PortalObjectId getId()

  Return the object id unique in the scope of its container.

  Returns:
    the object id

### getType

    int getType()

  Returns the type of the object which is a value that discriminates the object type.

  Returns:
    the object type.

### getName

    java.lang.String getName()

  Return the object name unique in the scope of its parent.

  Returns:
    the object name

### getDisplayName

    LocalizedString getDisplayName()

  Return the localized string used to represent that object.

  Returns:
    the localized display name

### setDisplayName

    void setDisplayName(LocalizedString localizedString)

  Set the localized string used to represent that object.

  Parameters:
    `the` - localized display name

### getListener

    java.lang.String getListener()

  Returns the listener id or null if there is none.

  Returns:
    the listener

### setListener

    void setListener(java.lang.String listener)

  Set a listener id.

  Parameters:
    `listener` - the listener id

### getChildren

    java.util.Collection<PortalObject> getChildren()

  Return all the children of this object.

  Returns:
    the children

### getChildren

    java.util.Collection<PortalObject> getChildren(int mask)

  Return all the children of this object filtered with a particular mask.

  Returns:
    the children

### getParent

    PortalObject getParent()

  Return the parent object.

  Returns:
    the parent object.

### getChild

    PortalObject getChild(java.lang.String name)

  Return a specific child object or null if it does not exist.

  Returns:
    a child object.

### destroyChild

    void destroyChild(java.lang.String name)
                      throws NoSuchPortalObjectException,
                             java.lang.IllegalArgumentException

  Destroy an existing child.

  Parameters:
    `name` - the child name
  Throws:
    `NoSuchPortalObjectException` - if the child does not exist
    `java.lang.IllegalArgumentException` - if the name argument is null

### copy

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

  Copy the portal object as a child of the specified object.

  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

### getProperty

    java.lang.String getProperty(java.lang.String name)
                                 throws java.lang.IllegalArgumentException

  Return a property of that object.

  Returns:
    the property value
  Throws:
    `java.lang.IllegalArgumentException` - if the name is null

### getProperties

    java.util.Map getProperties()

  Returns a read only map that contains the object properties.

  Returns:
    a map of the object properties

### getDeclaredProperty

    java.lang.String getDeclaredProperty(java.lang.String name)
                                         throws java.lang.IllegalArgumentException

  Return a property declared on that object.

  Returns:
    the property value
  Throws:
    `java.lang.IllegalArgumentException` - if the name is null

### setDeclaredProperty

    void setDeclaredProperty(java.lang.String name,
                             java.lang.String value)
                             throws java.lang.IllegalArgumentException

  Update a property declared on that object.

  Parameters:
    `name` - the property name
    `value` - the property value
  Throws:
    `java.lang.IllegalArgumentException` - if the name argument is null

### getDeclaredProperties

    java.util.Map getDeclaredProperties()

  Return a map that contains the object declared properties.

  Returns:
    a map of the properties declared by the object

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