com.togethersoft.openapi.model.extension
Interface LinkProvider


public interface LinkProvider
extends Provider

Provider, which implements this interface is responsible for supplying of Link interface
functionality of Entity.

Author:
TogetherSoft

Method Summary
 booleancanSetParticipant(Entity link, String role, Element oldParticipant, Element newParticipant)
          This method is called, when canSetParticipant method of Link was invoked
or before calling of setParticipant method.
 booleancanSetParticipant(Entity link, Element participant, String oldRole, String newRole)
          See description of
canSetParticipant(Entity link, String role,Element oldParticipant,Element newParticipant)
 booleanisApplicable(Entity link)
          It is guaranteed that before calling any other methods of the provider,
this method was invoked and result value was true.
 StringEnumerationparticipantRoles(Entity link)
          This method is used, when participantRoles of Entity was called.
 StringEnumerationparticipants(Entity link, String role)
          This method is used, when participants of Entity was called.
 voidsetParticipant(Entity link, String role, Element oldParticipant, Element newParticipant)
          This method is called when one participant must be changed with another.
 voidsetParticipant(Entity link, Element participant, String oldRole, String newRole)
          This method is called when role of participant must be changed.

Method Detail

canSetParticipant

public boolean canSetParticipant(Entity link, String role, Element oldParticipant, Element newParticipant)
This method is called, when canSetParticipant method of Link was invoked
or before calling of setParticipant method.
Provider must return true if it can make desired setting.

The result of collaborative execution of this method for multiple
link providers registered in the model is false when all applicable providers returned
false or true otherwise.


canSetParticipant

public boolean canSetParticipant(Entity link, Element participant, String oldRole, String newRole)
See description of
canSetParticipant(Entity link, String role,Element oldParticipant,Element newParticipant)

isApplicable

public boolean isApplicable(Entity link)
It is guaranteed that before calling any other methods of the provider,
this method was invoked and result value was true.

participantRoles

public StringEnumeration participantRoles(Entity link)
This method is used, when participantRoles of Entity was called.
Provider must return string enumeration roles, which participants of this link have.

The result of collaborative execution of this method for multiple
link providers registered in the model is a concatenation of the
enumerations returned by providers.


participants

public StringEnumeration participants(Entity link, String role)
This method is used, when participants of Entity was called.
Provider must return string enumeration of unique names of participants, which have specified
role.

The result of collaborative execution of this method for multiple
link providers registered in the model is a concatenation of the
enumerations returned by providers.


setParticipant

public void setParticipant(Entity link, String role, Element oldParticipant, Element newParticipant)
This method is called when one participant must be changed with another.
Method is called for every registered provider, which has returned true both
by isApplicable and canSetParticipants methods.

setParticipant

public void setParticipant(Entity link, Element participant, String oldRole, String newRole)
This method is called when role of participant must be changed.
Method is called for every registered provider, which has returned true both
by isApplicable and canSetParticipants methods.