org.apache.oodt.profile.handlers
Interface ProfileManager

All Superinterfaces:
ProfileHandler
All Known Implementing Classes:
DatabaseProfileManager

public interface ProfileManager
extends ProfileHandler

Interface of a profile manager. A profile manager can manage profiles by adding, removing, and manipulating them---in addition to searching them.

Version:
$Revision: 1.1.1.1 $
Author:
Kelly

Method Summary
 void add(Profile profile)
          Add a profile into the set of profiles managed by this profile server.
 void addAll(Collection collection)
          Add all of the profiles in the given collection to the set managed by this server.
 void clear()
          Clear all profiles.
 boolean contains(Profile profile)
          Tell if the given profile is managed by this server.
 boolean containsAll(Collection collection)
          Tell if the given collection of profiles are managed by this server.
 Collection getAll()
          Get all profiles.
 boolean isEmpty()
          Tell if the set of profiles managed by this server is empty.
 Iterator iterator()
          Iterate over the available profiles.
 boolean remove(String profID)
          Remove the profile with the given ID.
 boolean remove(String profID, String version)
          Remove the profile with the given ID.
 void replace(Profile profile)
          Replace a profile into the set of profiles managed by this profile server.
 int size()
          Get the size of the set of profiles managed by this server.
 
Methods inherited from interface org.apache.oodt.profile.handlers.ProfileHandler
findProfiles, get, getID
 

Method Detail

add

void add(Profile profile)
         throws ProfileException
Add a profile into the set of profiles managed by this profile server.

Parameters:
profile - The profile to add or replace.
Throws:
ProfileException - If any error occurs.

addAll

void addAll(Collection collection)
            throws ProfileException
Add all of the profiles in the given collection to the set managed by this server. Any profiles that already exist (as identified by their profile IDs) are replaced.

Parameters:
collection - Collection of Profiles to add.
Throws:
ProfileException - If any error occurs.

clear

void clear()
           throws ProfileException
Clear all profiles. This irrevocably removes all profiles from the server, leaving it with none.

Throws:
ProfileException - If any error occurs.

contains

boolean contains(Profile profile)
                 throws ProfileException
Tell if the given profile is managed by this server.

Parameters:
profile - The profile to check.
Returns:
True if profile is present in the server, false otherwise.
Throws:
ProfileException - If any error occurs.

containsAll

boolean containsAll(Collection collection)
                    throws ProfileException
Tell if the given collection of profiles are managed by this server.

Parameters:
collection - The collection of Profiles to check.
Returns:
True if every Profile in collection are present in the server, false otherwise.
Throws:
ProfileException - If any error occurs.

getAll

Collection getAll()
                  throws ProfileException
Get all profiles.

Returns:
A collection of profiles
Throws:
ProfileException - If any error occurs.

isEmpty

boolean isEmpty()
                throws ProfileException
Tell if the set of profiles managed by this server is empty.

Returns:
True if there are no profiles in this server.
Throws:
ProfileException - If any error occurs.

iterator

Iterator iterator()
                  throws ProfileException
Iterate over the available profiles. Each call to next yields a copy of the next Profile object managed by this server. Updates to profile objects are not backed by the server; make your updates and then call add(org.apache.oodt.profile.Profile).

Returns:
An iterator over Profiles.
Throws:
ProfileException - If any error occurs.

remove

boolean remove(String profID,
               String version)
               throws ProfileException
Remove the profile with the given ID. This removes forever the given profile from the set of profiles managed by this server.

Parameters:
profID - What profile to remove.
version - What version of the the profile identified by profID to remove.
Returns:
True if thie profile was actually present and removed; false if it wasn't present.
Throws:
ProfileException - If any error occurs.

remove

boolean remove(String profID)
               throws ProfileException
Remove the profile with the given ID. This removes forever the given profile from the set of profiles managed by this server.

Parameters:
profID - ID of profile to remove.
Returns:
True if thie profile was actually present and removed; false if it wasn't present.
Throws:
ProfileException - If any error occurs.

size

int size()
         throws ProfileException
Get the size of the set of profiles managed by this server.

Returns:
The number of available profiles.
Throws:
ProfileException - If any error occurs.

replace

void replace(Profile profile)
             throws ProfileException
Replace a profile into the set of profiles managed by this profile server.

Parameters:
profile - The profile to add or replace.
Throws:
ProfileException - If any error occurs.


Copyright © 1999-2013
Apache OODT. All Rights Reserved.