org.eclipse.corona.repository.adapter.team
Class TeamRepositoryAdapter

java.lang.Object
  extended by org.eclipse.corona.repository.adapter.team.TeamRepositoryAdapter
All Implemented Interfaces:
IRepositoryAdapter, ITeamRepositoryAdapter

public class TeamRepositoryAdapter
extends java.lang.Object
implements ITeamRepositoryAdapter

This adapter class supplies methods for accessing team member repositories holding information about human resources available to work on projects. The class implements ITeamRepositoryAdapter it supplies additional methods to retrieve a team member list.

Author:
PTXGXE0

Field Summary
(package private)  RepositoryDescriptor repositoryDescriptor
           
(package private)  TeamRepository teamRepository
           
(package private)  java.util.Properties teamRepositoryAdapterProperties
           
 
Fields inherited from interface org.eclipse.corona.repository.IRepositoryAdapter
ATTRIBUTE_ACCESS_TYPE, ATTRIBUTE_ADAPTER_CLASS, ATTRIBUTE_CONTENT_TYPE, ELEMENT_ADAPTER, ELEMENT_DESCRIPTOR, EXTENSION_POINT_ID
 
Constructor Summary
TeamRepositoryAdapter()
           
 
Method Summary
 void addResource(java.lang.Object resource)
          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 getTeamMemberList()
          The adapter interface for the TeamMemberRepository.
 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 repositoryDescriptor)
          set the RepositoryDescriptor Model for this repository adapter
 void setProperties(java.util.Properties respositoryProperties)
          pass platform specific properties into a repository adapter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

repositoryDescriptor

RepositoryDescriptor repositoryDescriptor

teamRepository

TeamRepository teamRepository

teamRepositoryAdapterProperties

java.util.Properties teamRepositoryAdapterProperties
Constructor Detail

TeamRepositoryAdapter

public TeamRepositoryAdapter()
Method Detail

setDescriptor

public void setDescriptor(RepositoryDescriptor repositoryDescriptor)
Description copied from interface: IRepositoryAdapter
set the RepositoryDescriptor Model for this repository adapter

Specified by:
setDescriptor in interface IRepositoryAdapter
Parameters:
repositoryDescriptor - the RepositoryDescriptor Model object which holds information about connecting to the repository

open

public void open()
          throws java.lang.Exception
Description copied from interface: IRepositoryAdapter
open the Repository for use, attempts to connect to Repository, if connection fails an exception is thrown

Specified by:
open in interface IRepositoryAdapter
Throws:
java.lang.Exception

close

public void close()
           throws java.lang.Exception
Description copied from interface: IRepositoryAdapter
close the Repository, if connection cannot be close an exception is thrown

Specified by:
close in interface IRepositoryAdapter
Throws:
java.lang.Exception

addResource

public void addResource(java.lang.Object resource)
Description copied from interface: IRepositoryAdapter
add a resource object to the repository

Specified by:
addResource in interface IRepositoryAdapter

removeResource

public void removeResource(java.lang.Object resourceId)
Description copied from interface: IRepositoryAdapter
remove a resource object with the given resource identifier from the repository

Specified by:
removeResource in interface IRepositoryAdapter
Parameters:
resourceId - identifier of resource to be removed from the repository.

fetchResource

public java.lang.Object fetchResource(java.lang.Object resourceId)
Description copied from interface: IRepositoryAdapter
return the resource object with the given identifier from the repository.

Specified by:
fetchResource in interface IRepositoryAdapter
Parameters:
resourceId - identifier of resource to be returned.
Returns:
object from the repository

getDescriptor

public RepositoryDescriptor getDescriptor()
Description copied from interface: IRepositoryAdapter
get the RepositoryDescriptor Model for this repository adapter

Specified by:
getDescriptor in interface IRepositoryAdapter
Returns:
the RepositoryDescriptor Model object which holds information about connecting to the repository

getName

public java.lang.String getName()
Description copied from interface: IRepositoryAdapter
get the name of the repository

Specified by:
getName in interface IRepositoryAdapter
Returns:
name of the repository

setProperties

public void setProperties(java.util.Properties respositoryProperties)
Description copied from interface: IRepositoryAdapter
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.

Specified by:
setProperties in interface IRepositoryAdapter
Parameters:
respositoryProperties - user or platform specific properties needed by a repository adapter

getProperties

public java.util.Properties getProperties()
Description copied from interface: IRepositoryAdapter
retrieve the user or platform specific properties used by this repository adapter.

Specified by:
getProperties in interface IRepositoryAdapter
Returns:
properties object containing user or platform specific properties used by this repository adapter

resourceExists

public boolean resourceExists(java.lang.Object resourceId)
Description copied from interface: IRepositoryAdapter
determine whether a resource with resourceName is in Repository

Specified by:
resourceExists in interface IRepositoryAdapter
Returns:

getTeamMemberList

public java.util.List getTeamMemberList()
Description copied from interface: ITeamRepositoryAdapter
The adapter interface for the TeamMemberRepository. It should be updated to include a aTeamMember and a removeTeamMember.

Specified by:
getTeamMemberList in interface ITeamRepositoryAdapter
Returns:
a List of Strings containing team member names. It should be returning a list TeamMember objects

listResourceIds

public java.util.List listResourceIds()
Description copied from interface: IRepositoryAdapter
get a list of resource identifiers from the repository

Specified by:
listResourceIds in interface IRepositoryAdapter
Returns:
a List of Objects (must the objects inplement a specifiec interface ?)

Copyright 2006 IBM Corporation and others.
All Rights Reserved.