tigase.db.comp

## Class RepositoryItemAbstract

- java.lang.Object
- - tigase.db.comp.RepositoryItemAbstract

- All Implemented Interfaces:
    RepositoryItem
  Direct Known Subclasses:
    ClusterRepoItem, CompRepoItem, ConfigItem, VHostItem

      public abstract class RepositoryItemAbstract
      extends Object
      implements RepositoryItem

  Created: Sep 23, 2010 6:53:14 PM
  Version:
    $Rev$
  Author:
    Artur Hefczyc

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `ADMINS_ATT` Field description
    `static String` | `ADMINS_LABEL` Field description
    `static String` | `OWNER_ATT` Field description
    `static String` | `OWNER_LABEL` Field description

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RepositoryItemAbstract()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addCommandFields(Packet packet)` Method description
    `String[]` | `getAdmins()` Method description
    `abstract String` | `getElemName()` Method description
    `String` | `getOwner()` Method description
    `void` | `initFromCommand(Packet packet)` Method description
    `void` | `initFromElement(tigase.xml.Element elem)` Method description
    `boolean` | `isAdmin(String id)` Method description
    `boolean` | `isOwner(String id)` Method description
    `void` | `setAdmins(String[] admins)` Method description
    `void` | `setOwner(String owner)` Method description
    `tigase.xml.Element` | `toElement()` Method description

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface tigase.db.comp.RepositoryItem

      `getKey, initFromPropertyString, toPropertyString`

- - ### Field Detail

    - #### ADMINS_ATT

          public static final String ADMINS_ATT

      Field description
      See Also:
        Constant Field Values

    - #### ADMINS_LABEL

          public static final String ADMINS_LABEL

      Field description
      See Also:
        Constant Field Values

    - #### OWNER_ATT

          public static final String OWNER_ATT

      Field description
      See Also:
        Constant Field Values

    - #### OWNER_LABEL

          public static final String OWNER_LABEL

      Field description
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### RepositoryItemAbstract

          public RepositoryItemAbstract()

  - ### Method Detail

    - #### getElemName

          public abstract String getElemName()

      Method description

    - #### addCommandFields

          public void addCommandFields(Packet packet)

      Method description
      Specified by:
        `addCommandFields` in interface `RepositoryItem`
      Parameters:
        `packet` -

    - #### getAdmins

          public String[] getAdmins()

      Method description
      Specified by:
        `getAdmins` in interface `RepositoryItem`
      Returns:
        an array with the Item administrators IDs.

    - #### getOwner

          public String getOwner()

      Method description
      Specified by:
        `getOwner` in interface `RepositoryItem`
      Returns:
        an ID of the Item owner.

    - #### initFromCommand

          public void initFromCommand(Packet packet)

      Method description
      Specified by:
        `initFromCommand` in interface `RepositoryItem`
      Parameters:
        `packet` -

    - #### initFromElement

          public void initFromElement(tigase.xml.Element elem)

      Method description
      Specified by:
        `initFromElement` in interface `RepositoryItem`
      Parameters:
        `elem` -

    - #### isAdmin

          public boolean isAdmin(String id)

      Method description
      Specified by:
        `isAdmin` in interface `RepositoryItem`
      Parameters:
        `id` -
      Returns:
        true of the given ID is on a list of administrators and false otherwise.

    - #### isOwner

          public boolean isOwner(String id)

      Method description
      Specified by:
        `isOwner` in interface `RepositoryItem`
      Parameters:
        `id` -
      Returns:
        true of the given ID is on the Item owner and false otherwise.

    - #### setAdmins

          public void setAdmins(String[] admins)

      Method description
      Specified by:
        `setAdmins` in interface `RepositoryItem`
      Parameters:
        `admins` -

    - #### setOwner

          public void setOwner(String owner)

      Method description
      Specified by:
        `setOwner` in interface `RepositoryItem`
      Parameters:
        `owner` -

    - #### toElement

          public tigase.xml.Element toElement()

      Method description
      Specified by:
        `toElement` in interface `RepositoryItem`
      Returns:
        an XML Element with all the item initialization data.

Copyright © 2014 "Tigase, Inc.". All rights reserved.