com.atlassian.user.repository
Class DefaultRepositoryIdentifier

java.lang.Object
  extended bycom.atlassian.user.repository.DefaultRepositoryIdentifier
All Implemented Interfaces:
RepositoryIdentifier, java.io.Serializable

public class DefaultRepositoryIdentifier
extends java.lang.Object
implements RepositoryIdentifier

Default identifier class for a repository.

Comparisons between different repositories are done with the key.

See Also:
equals(Object), Serialized Form

Constructor Summary
DefaultRepositoryIdentifier(java.lang.String key, java.lang.String name)
          Create a repository with the specified key.
 
Method Summary
 boolean equals(java.lang.Object o)
          Compares this repository with another repository, using the keys of both.
 java.lang.String getKey()
          String uniquely identifying this repository.
 java.lang.String getName()
          String with a more user-friendly name for the repository.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultRepositoryIdentifier

public DefaultRepositoryIdentifier(java.lang.String key,
                                   java.lang.String name)
Create a repository with the specified key.

Parameters:
key - the repository key, which must be unique and not null.
name - the name of the repository, which must not be null.
Throws:
java.lang.IllegalArgumentException - if either key or name is null.
Method Detail

getName

public java.lang.String getName()
Description copied from interface: RepositoryIdentifier
String with a more user-friendly name for the repository.

Implementations should not allow the name to be null.

Specified by:
getName in interface RepositoryIdentifier

getKey

public java.lang.String getKey()
Description copied from interface: RepositoryIdentifier
String uniquely identifying this repository. By default, it is configured in the key attribute on the repository tag in the atlassian-user.xml file.

Implementation should not allow the key to be null.

Specified by:
getKey in interface RepositoryIdentifier

equals

public boolean equals(java.lang.Object o)
Compares this repository with another repository, using the keys of both.

Returns:
true if the other object is a RepositoryIdentifier with an equal key, otherwise false.

hashCode

public int hashCode()

toString

public java.lang.String toString()


Copyright © 2005-2008 Atlassian Software Systems Pty Ltd. All Rights Reserved.