nl.toolforge.karma.core.location
Interface Location

All Known Implementing Classes:
BaseLocation, RemoteLocation

public interface Location

A Location describes a location aspect of a module. Source modules are kept in a version control system, binary (third party) modules are kept in libraries. These locations are maintained in locations.xml.

A developer should maintain a location-authentication.xml file in the Karma configuration directory. This file contains

Version:
$Id: Location.java,v 1.11 2004/11/02 23:57:06 asmedes Exp $
Author:
D.A. Smedes

Method Summary
 java.lang.StringBuffer asXML()
          Returns a <location>-element for the specific type of location.
 void connect()
          Tries to open a connection to the server if the protocol is a remote protocol.
 AuthenticatorKey getAuthenticatorKey()
           
 java.lang.String getId()
          A locations' identifier.
 LocationType getType()
          The locations' type descriptor.
 boolean isAvailable()
          Is the (remote) location available on the specified port ? Usefull to implement for remote locations.
 void setWorkingContext(WorkingContext workingContext)
           
 

Method Detail

isAvailable

public boolean isAvailable()
Is the (remote) location available on the specified port ? Usefull to implement for remote locations.

Returns:
false if the location is not available, true if it is.

getType

public LocationType getType()
The locations' type descriptor.

Returns:
A Location.Type instance.

getId

public java.lang.String getId()
A locations' identifier. Should be unique over all location-elements. This id is matched against the id-attribute of a location-element in the location-authentication.xml file (see class documentation Location.

Returns:
An identifier string for a location.

asXML

public java.lang.StringBuffer asXML()
Returns a <location>-element for the specific type of location.


connect

public void connect()
             throws AuthenticationException,
                    LocationException

Tries to open a connection to the server if the protocol is a remote protocol.

Throws:
LocationException - When connection failed. The ErrorCode will tell the reason.
AuthenticationException

setWorkingContext

public void setWorkingContext(WorkingContext workingContext)

getAuthenticatorKey

public AuthenticatorKey getAuthenticatorKey()


Copyright © 2002-2004 Toolforge. All Rights Reserved.