cfa.vo.iris.sed
Interface ISedManager<SedClass>

All Known Implementing Classes:
SedlibSedManager, SedManager

public interface ISedManager<SedClass>

SED managers provide centralized management of SED instances. This interface is generic to support the transition from Iris v1.0 to v2.0, where SEDLib changes are expected but not yet designed. The parameter must be constrained to the class of SEDs that is managed by the SED Manager implementation. Iris Components should use a SED manager as the only means of keeping track of opened SEDs.

Author:
olaurino

Method Summary
 void add(SedClass sed)
          Add an SED to be managed by this manager.
 void addAttachment(SedClass sed, String attachmentId, Object attachment)
          Components can attach any kind of objects to the SED, identifying them by a string.
 void addAttachment(String id, String attachmentId, Object attachment)
          Add an attachment using the SED ID as a key
 boolean existsSed(SedClass sed)
          Check whether an SED is managed by this SED Manager.
 boolean existsSed(String id)
          Check whether an SED is managed by this SED Manager.
 Object getAttachment(SedClass sed, String attachmentId)
          Retrieve an attachment from a given SED.
 Object getAttachment(String id, String attachmentId)
          Retrieve an attachment from a given SED.
 IList<SedClass> getSeds()
          Return the list of SEDs managed by this SED Manager.
 SedClass getSelected()
          All the time a single SED can be considered as "selected".
 SedClass newSed(String id)
          Create a new, empty managed SED.
 void remove(String id)
          Remove an SED from this manager.
 void removeAttachment(SedClass sed, String attachmentId)
          Remove an attachment from a SED.
 void removeAttachment(String id, String attachmentId)
          Remove an attachment from an SED.
 void rename(SedClass sed, String newId)
          Rename a managed sed;
 void select(SedClass sed)
          Set the selected SED.
 

Method Detail

getSeds

IList<SedClass> getSeds()
Return the list of SEDs managed by this SED Manager.

Returns:

existsSed

boolean existsSed(String id)
Check whether an SED is managed by this SED Manager.

Parameters:
id - The ID of the SED to be queried.
Returns:
True if this manager has an SED with the provided ID.

existsSed

boolean existsSed(SedClass sed)
Check whether an SED is managed by this SED Manager.

Parameters:
sed - The SED instance to be queried.
Returns:
True is the provided SED is managed but this manager.

addAttachment

void addAttachment(SedClass sed,
                   String attachmentId,
                   Object attachment)
Components can attach any kind of objects to the SED, identifying them by a string. To avoid name clashes it is strongly recommended that components use a namespace mechanism to the ID of the attachments.

Parameters:
sed - The SED to which attach the new object.
attachmentId - The String ID of the attachment.
attachment - The actual object to be attached.

removeAttachment

void removeAttachment(SedClass sed,
                      String attachmentId)
Remove an attachment from a SED.

Parameters:
sed - The SED to which the attachment has to be removed.
attachmentId - The ID of the attachment that has to be removed.

addAttachment

void addAttachment(String id,
                   String attachmentId,
                   Object attachment)
Add an attachment using the SED ID as a key

Parameters:
id - The ID of the SED to which the attachment has to be added.
attachmentId - The ID of the attachment.
attachment - The actual object to be attached.

getAttachment

Object getAttachment(SedClass sed,
                     String attachmentId)
Retrieve an attachment from a given SED.

Parameters:
sed - The SED object from which the attachment has to be retrieved.
attachmentId - the ID of the attachment to be retrieved.
Returns:
The attachment Object. The client must know how to cast this object to an useful class.

getAttachment

Object getAttachment(String id,
                     String attachmentId)
Retrieve an attachment from a given SED.

Parameters:
sed - The ID of the SED from which the attachment has to be retrieved.
attachmentId - the ID of the attachment to be retrieved.
Returns:
The attachment Object. The client must know how to cast this object to an useful class.

removeAttachment

void removeAttachment(String id,
                      String attachmentId)
Remove an attachment from an SED.

Parameters:
id - The ID of the SED from which the attachment has to be removed.
attachmentId - The ID of the attachment to be removed.

getSelected

SedClass getSelected()
All the time a single SED can be considered as "selected". The semantics of the selection depend on the use case, and the components are free to override this semantics or to ignore this selection accordingly to their use cases.

Returns:
The SED currently selected.

add

void add(SedClass sed)
Add an SED to be managed by this manager.

Parameters:
sed - The SED to add.

newSed

SedClass newSed(String id)
Create a new, empty managed SED.

Parameters:
id - The ID of the new SED.
Returns:
The newly created SED object.

remove

void remove(String id)
Remove an SED from this manager.

Parameters:
id - The ID of the SED that has to be dropped.

select

void select(SedClass sed)
Set the selected SED.

Parameters:
sed - The SED that has to be selected.

rename

void rename(SedClass sed,
            String newId)
Rename a managed sed;

Parameters:
sed - The SED to be renamed
newId - the new SED name


Copyright © 2013. All rights reserved.