org.eclipse.corona.repository.xml.team
Class TeamRepository

java.lang.Object
  extended by org.eclipse.corona.repository.xml.team.TeamRepository

public class TeamRepository
extends java.lang.Object

This is a very simple team member repository. The implementation uses an XML file for storing the team members. The XML file is loaded into a DOM and then the team member element nodes are added and removed. The example repository is located int /repositories/TeamMembers.xml Here is what TeamMembers.xml looks like: Edyta Kalka Dennis O'Flynn Pawel Kaczmarek Marcin Okraszewski Glenn Everitt

Author:
PTXGXE0

Field Summary
static java.lang.String repositoryName
           
 
Constructor Summary
TeamRepository(RepositoryDescriptor repositoryDescriptor)
           
 
Method Summary
 void addMember(java.lang.String memberName)
           
 void close()
          closing the TeamMemberRepository saves the changes to the TeamMemberRepository in an XML file
 java.lang.String getName()
          Get the name of the TeamMemberRepository
 java.util.Properties getProperties()
           
 java.util.List getTeamMemberList()
          Get a List of team member names
protected  java.util.List getTeamMemberNameList(org.w3c.dom.Document doc)
          Get a list of team member names included in DOM
 java.lang.String getType()
           
 java.lang.String getVersion()
           
protected  org.w3c.dom.Document loadTeamMemberFile(java.io.File file)
          Load the XML file holding the team member XML
 boolean memberExists(java.lang.String memberName)
           
 void open()
          Open the TeamMemberRepository causes XML file to be loaded into memory as a DOM.
 void removeMember(java.lang.String memberName)
          Remove a team member from the team member repository.
 void setProperties(java.util.Properties respositoryProperties)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

repositoryName

public static final java.lang.String repositoryName
See Also:
Constant Field Values
Constructor Detail

TeamRepository

public TeamRepository(RepositoryDescriptor repositoryDescriptor)
Method Detail

open

public void open()
Open the TeamMemberRepository causes XML file to be loaded into memory as a DOM.


close

public void close()
closing the TeamMemberRepository saves the changes to the TeamMemberRepository in an XML file


loadTeamMemberFile

protected org.w3c.dom.Document loadTeamMemberFile(java.io.File file)
Load the XML file holding the team member XML

Parameters:
file - file object of team member XML
Returns:
DOM object of XML parsed from file

getTeamMemberNameList

protected java.util.List getTeamMemberNameList(org.w3c.dom.Document doc)
Get a list of team member names included in DOM

Parameters:
doc - DOM holding the team member information
Returns:
List of Strings container Team Member Name, this is a single String which probably contains first and last name of team member.

getTeamMemberList

public java.util.List getTeamMemberList()
Get a List of team member names

Returns:
a List of Strings containing team member names. Each team member name is a single String which probably contains first and last name of a team member.

getName

public java.lang.String getName()
Get the name of the TeamMemberRepository

Returns:
String holding the TeamMemberRepository Name

addMember

public void addMember(java.lang.String memberName)
Parameters:
memberName -

removeMember

public void removeMember(java.lang.String memberName)
Remove a team member from the team member repository. The name must match exactly to be removed.

Parameters:
memberName - remove this team member if it exists in the team member repository

memberExists

public boolean memberExists(java.lang.String memberName)
Parameters:
memberName - see if a team member with the given name exists in the team member repository
Returns:
True if team member is in team member repository, otherwise return False.

getProperties

public java.util.Properties getProperties()

setProperties

public void setProperties(java.util.Properties respositoryProperties)

getVersion

public java.lang.String getVersion()
Returns:
version of this repository

getType

public java.lang.String getType()
Returns:
String containing the type of repository

Copyright 2006 IBM Corporation and others.
All Rights Reserved.