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

java.lang.Object
  extended by org.modeshape.web.jcr.rest.client.domain.Server
All Implemented Interfaces:
IModeShapeObject

@Immutable
public class Server
extends Object
implements IModeShapeObject

The Server class is the business object for a server that is hosting one or more ModeShape repositories.


Constructor Summary
Server(String url, String user, String password)
          Constructs on new Server.
 
Method Summary
 boolean equals(Object obj)
          
 String getName()
          
 String getPassword()
           
 String getShortDescription()
          
 String getUrl()
           
 String getUser()
           
 int hashCode()
          
 boolean hasSameKey(Server otherServer)
          A server has the same identifying properties if their URL and user matches.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Server

public Server(String url,
              String user,
              String password)
Constructs on new Server.

Parameters:
url - the server URL (never null)
user - the server user (may be null)
password - the server password (may be null)
Throws:
IllegalArgumentException - if the URL or user arguments are null
Method Detail

equals

public boolean equals(Object obj)

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

getName

public String getName()

Specified by:
getName in interface IModeShapeObject
Returns:
the object name (never null)
See Also:
IModeShapeObject.getName()

getPassword

public String getPassword()
Returns:
the server authentication password

getShortDescription

public String getShortDescription()

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

getUrl

public String getUrl()
Returns:
the server URL (never null)

getUser

public String getUser()
Returns:
the server authentication user (never null)

hashCode

public int hashCode()

Overrides:
hashCode in class Object
See Also:
Object.hashCode()

hasSameKey

public boolean hasSameKey(Server otherServer)
A server has the same identifying properties if their URL and user matches.

Parameters:
otherServer - the server whose key is being compared (never null)
Returns:
true if the servers have the same key
Throws:
IllegalArgumentException - if the argument is null

toString

public String toString()

Overrides:
toString in class Object
See Also:
Object.toString()


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