org.openfjord.business.workflow
Interface ElementManager

All Known Subinterfaces:
ElementManagerRemote
All Known Implementing Classes:
ElementManagerBean, ElementManagerDelegate

public interface ElementManager

Title: openFJORD

Description: open Flexible Java Online Research Designer

Copyright: Copyright (c) 2003 Ingo Düppe

Company: University of Muenster

Version:
1.0
Author:
Ingo Düppe
See Also:
ElementManagerDelegate

Method Summary
 SurveyElementContainer addElement(SurveyElement element, SurveyElementContainer parent)
          This method will create a new server side element and will add it to the parent element.
 SurveyElementContainer deleteElement(SurveyElement element)
          Deletes a specific service side element specified by the primary key information of the value object
 SurveyElementContainer getContainer(java.lang.String elementId)
          Returning a survey element container with his sub elements defined by his primary key.
 SurveyElementContainer getContainer(SurveyElement element)
          Returning a survey element container with his sub elements defined by his value object.
 SurveyElementContainer moveElement(SurveyElement element, int offset)
          Moves the element to a new position in the same container
 SurveyElementContainer moveElement(SurveyElement element, SurveyElementContainer destination)
          Moves the element from the current parent container to the new parent container
 SurveyElementContainer updateContainer(SurveyElementContainer container)
          Updates the server side element container with new data.
 SurveyElementContainer updateElement(SurveyElement element)
          Updates the server side element with new data.
 

Method Detail

getContainer

public SurveyElementContainer getContainer(SurveyElement element)
                                    throws java.rmi.RemoteException,
                                           NoElementContainerException
Returning a survey element container with his sub elements defined by his value object. The receiving container object contains the parent object and his direct sub elements.

Returns:
the container with sub elements of the first level
Throws:
java.rmi.RemoteException - something gone wrong
NoElementContainerException

getContainer

public SurveyElementContainer getContainer(java.lang.String elementId)
                                    throws java.rmi.RemoteException
Returning a survey element container with his sub elements defined by his primary key. The receiving container object contains the parent object and his direct sub elements.

Parameters:
elementId - the primary key of the element container
Returns:
the container with sub elements of the first level
Throws:
java.rmi.RemoteException - something gone wrong

updateContainer

public SurveyElementContainer updateContainer(SurveyElementContainer container)
                                       throws java.rmi.RemoteException
Updates the server side element container with new data. This method will not update any sub elements.

Parameters:
container - value object with the new data
Returns:
SurveyElementContainer with updated fields
Throws:
java.rmi.RemoteException - something gone wrong

addElement

public SurveyElementContainer addElement(SurveyElement element,
                                         SurveyElementContainer parent)
                                  throws java.rmi.RemoteException
This method will create a new server side element and will add it to the parent element. If the element value object contains primary key information of a server side element, it will add this element to the parent container.

Parameters:
element - the new element
parent - element will add to the parent container object
Returns:
SurveyElementContainer with all direct sub elements even the new one.
Throws:
java.rmi.RemoteException - something gone wrong

updateElement

public SurveyElementContainer updateElement(SurveyElement element)
                                     throws java.rmi.RemoteException
Updates the server side element with new data. It is mandatory that this value object containing a primary key information of the server side element.

Parameters:
element - value object with new data.
Returns:
SurveyElementContainer which containing the updated element as sub element
Throws:
java.rmi.RemoteException - something gone wrong

deleteElement

public SurveyElementContainer deleteElement(SurveyElement element)
                                     throws java.rmi.RemoteException
Deletes a specific service side element specified by the primary key information of the value object

Parameters:
element - value object containing primary key information
Returns:
SurveyElementContainer without the deleted element
Throws:
java.rmi.RemoteException - something gone wrong

moveElement

public SurveyElementContainer moveElement(SurveyElement element,
                                          int offset)
                                   throws java.rmi.RemoteException
Moves the element to a new position in the same container

Parameters:
element - the value object
offset - new position relative to the old
Returns:
SurveyElementContainer with the new position of the element
Throws:
java.rmi.RemoteException - somthing gone wrong

moveElement

public SurveyElementContainer moveElement(SurveyElement element,
                                          SurveyElementContainer destination)
                                   throws java.rmi.RemoteException
Moves the element from the current parent container to the new parent container

Parameters:
element - the value object of the server side element with primary key information
destination - new parent container object
Returns:
SurveyElementContainer with the new position of the element
Throws:
java.rmi.RemoteException - something gone wrong


openFJORD Copyright © 2003 University of Muenster.