Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright © 2006 BEA Systems, Inc. All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.compoze.collab
Class ItemClass

    java.lang.Object
      com.compoze.collab.ItemClass

All Implemented Interfaces
  Serializable

Direct Known Subclasses:
  ContainerClass

    public class ItemClass

extends Object
implements Serializable

Defines the class of an `Item` including its name, default keys, implementing Java class, containing item class and parent item class. Defines how to create a class of `Item` instance.

See Also
  Serialized Form

Field Summary
`protected Key[]` | `m_defaultKeys`
`protected Class` | `m_javaClass`
`protected String` | `m_sContainingItemClass`
`protected String` | `m_sInternalName`
`protected String` | `m_sItemClassParent`

Method Summary
`protected static boolean` | `checkForDuplicates(Key[] defaultKeys)` Check for duplicates in the defaultKeys array
`static ItemClass` | `create(String sInternalName, Key[] defaultKeys, Class javaClass, String sContainingItemClass, String sItemClassParent)` Creates an ItemClass, given its name and properties, or returns an existing ItemClass if one has already been created with the same name and properties.
`boolean` | `equals(Object obj)` Equals.
`String` | `getContainingItemClass()` Get the internal name of the `ItemClass` of containers of this `ItemClass`.
`Key[]` | `getDefaultKeys()` Gets the Keys for the properties that are available for a specific Item.
`String` | `getInternalName()` Get the ItemClass's name.
`String` | `getItemClassParent()` Gets the internal name of the parent `ItemClass` that this `ItemClass` extends.
`Class` | `getJavaClass()` Gets the implementation class for the item class.
`Key[]` | `getMinimumKeys()` Gets the minimum set of keys for this class.
`int` | `hashCode()` Gets the hash code of the item class (the hash of its internal name).
`boolean` | `isDefaultKey(Key key)` Determines if the specified key is a default for the item.
`boolean` | `isInstanceOf(ItemClass itemClass)` Checks to see if this `ItemClass` is the same as or a subclass of the given `ItemClass`.
`static ItemClass` | `lookupItemClass(String sInternalName)` Find the ItemClass instance for the internal name.
`String` | `toString()`

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

Field Detail

### m_sInternalName

    protected String m_sInternalName

### m_defaultKeys

    protected Key[] m_defaultKeys

### m_javaClass

    protected Class m_javaClass

### m_sContainingItemClass

    protected String m_sContainingItemClass

### m_sItemClassParent

    protected String m_sItemClassParent

Method Detail

### create

    public static ItemClass create(String sInternalName,
                                   Key[] defaultKeys,
                                   Class javaClass,
                                   String sContainingItemClass,
                                   String sItemClassParent)
                            throws CollaborationException

  Creates an ItemClass, given its name and properties, or returns an existing ItemClass if one has already been created with the same name and properties.

  Parameters
    `sInternalName` - unique internal name for this class (not `null`)
    `defaultKeys` - array of class specific default keys; `null` means none
    `javaClass` - Java class representing this class; must implement `IItem` (not `null`)
    `sContainingItemClass` - the internal name of the item class of containers of this item (may be `null` if the item has no logical container, such as a root container)
    `sItemClassParent` - the internal name of the parent item class that this item class extends.
  Throws
    `CollaborationException` - if `sInternalName` or `javaClass` is `null`, if sInternalName is already used for a different class, or javaClass does not implement IItem.

### checkForDuplicates

    protected static boolean checkForDuplicates(Key[] defaultKeys)

  Check for duplicates in the defaultKeys array

  Parameters
    `defaultKeys` - the default Key array
  Returns
    `true` if there are any duplicates

### getDefaultKeys

    public Key[] getDefaultKeys()

  Gets the Keys for the properties that are available for a specific Item.

  Returns
    an array containing the default keys. If no default keys, returns `Key[0]`, never `null`.

### getMinimumKeys

    public Key[] getMinimumKeys()

  Gets the minimum set of keys for this class.

  Returns
    an array containing the minimum keys

### isDefaultKey

    public boolean isDefaultKey(Key key)

  Determines if the specified key is a default for the item.

  Parameters
    `key` - the key (must not be `null`)
  Returns
    `true` if the key is a default key

### getInternalName

    public String getInternalName()

  Get the ItemClass's name.

  Returns
    the internal name

### getJavaClass

    public Class getJavaClass()

  Gets the implementation class for the item class.

### lookupItemClass

    public static ItemClass lookupItemClass(String sInternalName)

  Find the ItemClass instance for the internal name.

  Parameters
    `sInternalName` - internal name to look up
  Returns
    corresponding ItemClass instance; `null` if none exists

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`
  Returns
    the string
  See Also
    `Object.toString()`

### getContainingItemClass

    public String getContainingItemClass()

  Get the internal name of the `ItemClass` of containers of this `ItemClass`.

  Returns
    the ContainingItemClass.

### isInstanceOf

    public boolean isInstanceOf(ItemClass itemClass)

  Checks to see if this `ItemClass` is the same as or a subclass of the given `ItemClass`.

  Parameters
    `itemClass` - the `ItemClass` to check (not `null`)
  Returns
    `true` if `itemClass` is the same or a subclass of this class

### getItemClassParent

    public String getItemClassParent()

  Gets the internal name of the parent `ItemClass` that this `ItemClass` extends.

  Returns
    the internal name of the item class that is the parent of this item's item class.

### hashCode

    public int hashCode()

  Gets the hash code of the item class (the hash of its internal name).

  Overrides:
    `hashCode` in class `Object`
  Returns
    the hash code

### equals

    public boolean equals(Object obj)

  Equals. Compares using the internal name.

  Overrides:
    `equals` in class `Object`
  Returns
    `true` if the specified object is an `ItemClass` instance with the same internal name

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

Copyright © 2006 BEA Systems, Inc. All Rights Reserved