# com.bea.content.spi
Repository Interface

public interface Repository
extends `Serializable`

Represents a content repository and facilitates connecting to it.

All Known Implementing Classes
  `RepositoryImpl`

All Superinterfaces
  `Serializable`

## Method Summary

`public `Ticket`` | `connect`(`Credentials` credentials) Returns a ticket if the user can be authenticated.
`public `Ticket`` | `connect`(`String` username, `String` password) Returns a ticket if the user can be authenticated.
`public `String`` | `getName`() Gets the name of this Repository.
`public `Properties`` | `getProperties`() Gets the configuration properties for this repository.
`public void` | `setName`(`String` name) Sets the name of this Repository.
`public void` | `setProperties`(`Properties` properties) Sets the configuration properties for this repository.

## Method Detail

### connect(Credentials) Method

    public Ticket connect(Credentials credentials)
         throws AuthenticationException, RepositoryException

Returns a ticket if the user can be authenticated. The credentials is from a user that was already authenticated in the WebLogic server.

#### Parameters

credentials
  - the credentials of the user connecting to the Repository.

#### Exceptions

``AuthenticationException``
  if the authentication fails.
``RepositoryException``
  if a non-authentication error occurs.

### connect(String, String) Method

    public Ticket connect(String username,
                          String password)
         throws AuthenticationException, RepositoryException

Returns a ticket if the user can be authenticated.

#### Parameters

username
  - the username to authenticate.

password
  - the password for the user.

#### Exceptions

``AuthenticationException``
  if the authentication fails.
``RepositoryException``
  if a non-authentication error occurs.

### getName() Method

    public String getName()

Gets the name of this Repository.

### getProperties() Method

    public Properties getProperties()

Gets the configuration properties for this repository.

#### Returns

Properties, the repository configuration properties.

### setName(String) Method

    public void setName(String name)

Sets the name of this Repository. This will always be set before connect is called.

### setProperties(Properties) Method

    public void setProperties(Properties properties)

Sets the configuration properties for this repository. The config map will always be set before connect is called.

#### Parameters

properties
  - the repository configuration properties.