org.eclipse.corona.repository
Interface IRepositoryAdapter

All Known Subinterfaces:
ITeamRepositoryAdapter, IUIRepositoryAdapter
All Known Implementing Classes:
TeamRepositoryAdapter, WpCvsRepositoryAdapter

public interface IRepositoryAdapter


Field Summary
static java.lang.String ATTRIBUTE_ACCESS_TYPE
           
static java.lang.String ATTRIBUTE_ADAPTER_CLASS
           
static java.lang.String ATTRIBUTE_CONTENT_TYPE
           
static java.lang.String ELEMENT_ADAPTER
           
static java.lang.String ELEMENT_DESCRIPTOR
           
static java.lang.String EXTENSION_POINT_ID
           
 
Method Summary
 void addResource(java.lang.Object resourceObject)
          add a resource object to the repository
 void close()
          close the Repository, if connection cannot be close an exception is thrown
 java.lang.Object fetchResource(java.lang.Object resourceId)
          return the resource object with the given identifier from the repository.
 RepositoryDescriptor getDescriptor()
          get the RepositoryDescriptor Model for this repository adapter
 java.lang.String getName()
          get the name of the repository
 java.util.Properties getProperties()
          retrieve the user or platform specific properties used by this repository adapter.
 java.util.List listResourceIds()
          get a list of resource identifiers from the repository
 void open()
          open the Repository for use, attempts to connect to Repository, if connection fails an exception is thrown
 void removeResource(java.lang.Object resourceId)
          remove a resource object with the given resource identifier from the repository
 boolean resourceExists(java.lang.Object resourceId)
          determine whether a resource with resourceName is in Repository
 void setDescriptor(RepositoryDescriptor repoDescriptor)
          set the RepositoryDescriptor Model for this repository adapter
 void setProperties(java.util.Properties respositoryProperties)
          pass platform specific properties into a repository adapter.
 

Field Detail

EXTENSION_POINT_ID

static final java.lang.String EXTENSION_POINT_ID
See Also:
Constant Field Values

ELEMENT_DESCRIPTOR

static final java.lang.String ELEMENT_DESCRIPTOR
See Also:
Constant Field Values

ATTRIBUTE_CONTENT_TYPE

static final java.lang.String ATTRIBUTE_CONTENT_TYPE
See Also:
Constant Field Values

ATTRIBUTE_ACCESS_TYPE

static final java.lang.String ATTRIBUTE_ACCESS_TYPE
See Also:
Constant Field Values

ELEMENT_ADAPTER

static final java.lang.String ELEMENT_ADAPTER
See Also:
Constant Field Values

ATTRIBUTE_ADAPTER_CLASS

static final java.lang.String ATTRIBUTE_ADAPTER_CLASS
See Also:
Constant Field Values
Method Detail

setDescriptor

void setDescriptor(RepositoryDescriptor repoDescriptor)
set the RepositoryDescriptor Model for this repository adapter

Parameters:
repoDescriptor - the RepositoryDescriptor Model object which holds information about connecting to the repository

getDescriptor

RepositoryDescriptor getDescriptor()
get the RepositoryDescriptor Model for this repository adapter

Returns:
the RepositoryDescriptor Model object which holds information about connecting to the repository

getName

java.lang.String getName()
get the name of the repository

Returns:
name of the repository

setProperties

void setProperties(java.util.Properties respositoryProperties)
pass platform specific properties into a repository adapter. Some information need to connect to a repository may not make sense to be saved in the RepositoryDescriptor since it may be specific to a user or the platform the user is using. This method is a way to pass this type of information into a repository adater. Currently, nothing is using this method.

Parameters:
respositoryProperties - user or platform specific properties needed by a repository adapter

getProperties

java.util.Properties getProperties()
retrieve the user or platform specific properties used by this repository adapter.

Returns:
properties object containing user or platform specific properties used by this repository adapter

open

void open()
          throws java.lang.Exception
open the Repository for use, attempts to connect to Repository, if connection fails an exception is thrown

Throws:
java.lang.Exception

close

void close()
           throws java.lang.Exception
close the Repository, if connection cannot be close an exception is thrown

Throws:
java.lang.Exception

resourceExists

boolean resourceExists(java.lang.Object resourceId)
determine whether a resource with resourceName is in Repository

Parameters:
resourceName -
Returns:

addResource

void addResource(java.lang.Object resourceObject)
add a resource object to the repository

Parameters:
resourceObject -

removeResource

void removeResource(java.lang.Object resourceId)
remove a resource object with the given resource identifier from the repository

Parameters:
resourceId - identifier of resource to be removed from the repository.

fetchResource

java.lang.Object fetchResource(java.lang.Object resourceId)
return the resource object with the given identifier from the repository.

Parameters:
resourceId - identifier of resource to be returned.
Returns:
object from the repository

listResourceIds

java.util.List listResourceIds()
get a list of resource identifiers from the repository

Returns:
a List of Objects (must the objects inplement a specifiec interface ?)

Copyright 2006 IBM Corporation and others.
All Rights Reserved.