org.modeshape.web.jcr.rest.client.domain

## Class Repository

- java.lang.Object
- - org.modeshape.web.jcr.rest.client.domain.Repository

- All Implemented Interfaces:
    IModeShapeObject

      @Immutable
      public class Repository
      extends Object
      implements IModeShapeObject

  The Repository class is the business object for a ModeShape repository.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Repository(String name, Server server)` Constructs a new `Repository`.
    `Repository(String name, Server server, Map<String,Object> metadata)` Constructs a new `Repository`.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `Map<String,Object>` | `getMetadata()` Get the metadata for this repository.
    `String` | `getName()`
    `Server` | `getServer()`
    `String` | `getShortDescription()`
    `int` | `hashCode()`
    `String` | `toString()`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Repository

          public Repository(String name,
                    Server server)

      Constructs a new `Repository`.
      Parameters:
        `name` - the repository name (never `null`)
        `server` - the server where this repository resides (never `null`)
      Throws:
        `IllegalArgumentException` - if the name or server argument is `null`

    - #### Repository

          public Repository(String name,
                    Server server,
                    Map<String,Object> metadata)

      Constructs a new `Repository`.
      Parameters:
        `name` - the repository name (never `null`)
        `server` - the server where this repository resides (never `null`)
        `metadata` - the metadata; may be null or empty
      Throws:
        `IllegalArgumentException` - if the name or server argument is `null`

  - ### Method Detail

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### getName

          public String getName()

      Specified by:
        `getName` in interface `IModeShapeObject`
      Returns:
        the object name (never `null`)

    - #### getServer

          public Server getServer()

      Returns:
        the server where this repository is located (never `null`)

    - #### getMetadata

          public Map<String,Object> getMetadata()

      Get the metadata for this repository. This metadata typically includes all of a JCR Repository's descriptors, where the values are usually strings or arrays of strings.
      Returns:
        the immutable map of metadata; never null but possibly empty if the metadata is not known

    - #### getShortDescription

          public String getShortDescription()

      Specified by:
        `getShortDescription` in interface `IModeShapeObject`
      Returns:
        a description suitable for use in a tooltip (never `null`)

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.