cfa.vo.iris.sed
Class SedlibSedManager

java.lang.Object
  extended by cfa.vo.iris.sed.SedlibSedManager
All Implemented Interfaces:
ISedManager<ExtSed>

public class SedlibSedManager
extends Object
implements ISedManager<ExtSed>

Author:
olaurino

Constructor Summary
SedlibSedManager()
           
 
Method Summary
 void add(ExtSed sed)
          Add an SED to be managed by this manager.
 void addAttachment(ExtSed 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(ExtSed 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(ExtSed sed, String attachmentId)
          Retrieve an attachment from a given SED.
 Object getAttachment(String id, String attachmentId)
          Retrieve an attachment from a given SED.
 IList<ExtSed> getSeds()
          Return the list of SEDs managed by this SED Manager.
 ExtSed getSelected()
          All the time a single SED can be considered as "selected".
 ExtSed newSed(String id)
          Create a new, empty managed SED.
 void remove(String id)
          Remove an SED from this manager.
 void removeAttachment(ExtSed sed, String attachmentId)
          Remove an attachment from a SED.
 void removeAttachment(String id, String attachmentId)
          Remove an attachment from an SED.
 void rename(ExtSed sed, String newId)
          Rename a managed sed;
 void select(ExtSed sed)
          Set the selected SED.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SedlibSedManager

public SedlibSedManager()
Method Detail

getSeds

public IList<ExtSed> getSeds()
Description copied from interface: ISedManager
Return the list of SEDs managed by this SED Manager.

Specified by:
getSeds in interface ISedManager<ExtSed>
Returns:

existsSed

public boolean existsSed(ExtSed sed)
Description copied from interface: ISedManager
Check whether an SED is managed by this SED Manager.

Specified by:
existsSed in interface ISedManager<ExtSed>
Parameters:
sed - The SED instance to be queried.
Returns:
True is the provided SED is managed but this manager.

addAttachment

public void addAttachment(ExtSed sed,
                          String attachmentId,
                          Object attachment)
Description copied from interface: ISedManager
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.

Specified by:
addAttachment in interface ISedManager<ExtSed>
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

public void removeAttachment(ExtSed sed,
                             String attachmentId)
Description copied from interface: ISedManager
Remove an attachment from a SED.

Specified by:
removeAttachment in interface ISedManager<ExtSed>
Parameters:
sed - The SED to which the attachment has to be removed.
attachmentId - The ID of the attachment that has to be removed.

removeAttachment

public void removeAttachment(String id,
                             String attachmentId)
Description copied from interface: ISedManager
Remove an attachment from an SED.

Specified by:
removeAttachment in interface ISedManager<ExtSed>
Parameters:
id - The ID of the SED from which the attachment has to be removed.
attachmentId - The ID of the attachment to be removed.

addAttachment

public void addAttachment(String id,
                          String attachmentId,
                          Object attachment)
Description copied from interface: ISedManager
Add an attachment using the SED ID as a key

Specified by:
addAttachment in interface ISedManager<ExtSed>
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

public Object getAttachment(ExtSed sed,
                            String attachmentId)
Description copied from interface: ISedManager
Retrieve an attachment from a given SED.

Specified by:
getAttachment in interface ISedManager<ExtSed>
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

public Object getAttachment(String id,
                            String attachmentId)
Description copied from interface: ISedManager
Retrieve an attachment from a given SED.

Specified by:
getAttachment in interface ISedManager<ExtSed>
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.

getSelected

public ExtSed getSelected()
Description copied from interface: ISedManager
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.

Specified by:
getSelected in interface ISedManager<ExtSed>
Returns:
The SED currently selected.

add

public void add(ExtSed sed)
Description copied from interface: ISedManager
Add an SED to be managed by this manager.

Specified by:
add in interface ISedManager<ExtSed>
Parameters:
sed - The SED to add.

remove

public void remove(String id)
Description copied from interface: ISedManager
Remove an SED from this manager.

Specified by:
remove in interface ISedManager<ExtSed>
Parameters:
id - The ID of the SED that has to be dropped.

select

public void select(ExtSed sed)
Description copied from interface: ISedManager
Set the selected SED.

Specified by:
select in interface ISedManager<ExtSed>
Parameters:
sed - The SED that has to be selected.

newSed

public ExtSed newSed(String id)
Description copied from interface: ISedManager
Create a new, empty managed SED.

Specified by:
newSed in interface ISedManager<ExtSed>
Parameters:
id - The ID of the new SED.
Returns:
The newly created SED object.

existsSed

public boolean existsSed(String id)
Description copied from interface: ISedManager
Check whether an SED is managed by this SED Manager.

Specified by:
existsSed in interface ISedManager<ExtSed>
Parameters:
id - The ID of the SED to be queried.
Returns:
True if this manager has an SED with the provided ID.

rename

public void rename(ExtSed sed,
                   String newId)
Description copied from interface: ISedManager
Rename a managed sed;

Specified by:
rename in interface ISedManager<ExtSed>
Parameters:
sed - The SED to be renamed
newId - the new SED name


Copyright © 2013. All rights reserved.