org.jbpm.formbuilder.client
Class RestyFormBuilderModel

java.lang.Object
  extended by org.jbpm.formbuilder.client.RestyFormBuilderModel
All Implemented Interfaces:
FormBuilderService

public class RestyFormBuilderModel
extends Object
implements FormBuilderService


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jbpm.formbuilder.client.FormBuilderService
FormBuilderService.RolesResponseHandler
 
Constructor Summary
RestyFormBuilderModel(String contextPath)
           
 
Method Summary
 void deleteFile(String url)
           
 void deleteForm(FormRepresentation form)
          Deletes a form from the server
 void deleteFormItem(String formItemName, FormItemRepresentation formItem)
          Deletes a UI component from the server
 void deleteMenuItem(String groupName, FBMenuItem item)
          Deletes a custom menu item from the server
 void generateForm(FormRepresentation form, String language, Map<String,Object> inputs)
          Translates a form.
 void getCurrentRoles(FormBuilderService.RolesResponseHandler handler)
           
 void getExistingIoAssociations(String filter)
          Returns the IoAssociations as matching on a simple string filter
 void getExistingValidations()
          Returns existing validations from the server
 void getFiles(List<String> types, FilesLoadedHandler handler)
           
 void getForm(String formName)
          Returns a single form
 void getForms()
          Returns all forms
 void getMenuItems()
          Gets a map of groups indexed by group name.
 void getMenuOptions()
          Gets a list of menu options, generally for a menu bar.
 String getUploadActionURL()
           
 String getUploadFileURL()
           
 void loadFormTemplate(FormRepresentation form, String language)
          Loads a file from the server that contains a given language's form template
 void logout()
           
 void populateRepresentationFactory()
          Populates the RepresentationFactory with the form items and representations that belong to them.
 void saveForm(FormRepresentation form)
          Saves a form on the server
 void saveFormItem(FormItemRepresentation formItem, String formItemName)
          Saves a UI component on the server
 void saveMenuItem(String groupName, FBMenuItem item)
          Saves a new (custom) menu item on the server
 void selectIoAssociation(String pkgName, String processName, String taskName)
          Fires a TaskSelectedEvent in case you can find the proper task in the server
 void setPackageName(String packageName)
           
 FormRepresentation toBasicForm(TaskRef task)
          Returns the form representation that basically describes a task
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RestyFormBuilderModel

public RestyFormBuilderModel(String contextPath)
Method Detail

setPackageName

public void setPackageName(String packageName)
Specified by:
setPackageName in interface FormBuilderService

getMenuItems

public void getMenuItems()
Description copied from interface: FormBuilderService
Gets a map of groups indexed by group name. Each group contains a list of menu items available in each group.

Specified by:
getMenuItems in interface FormBuilderService

getCurrentRoles

public void getCurrentRoles(FormBuilderService.RolesResponseHandler handler)
Specified by:
getCurrentRoles in interface FormBuilderService

logout

public void logout()
Specified by:
logout in interface FormBuilderService

getMenuOptions

public void getMenuOptions()
Description copied from interface: FormBuilderService
Gets a list of menu options, generally for a menu bar. Each option has a name, and maybe a subMenu consisting of a list of menu options, or maybe a command, or maybe both.

Specified by:
getMenuOptions in interface FormBuilderService

saveForm

public void saveForm(FormRepresentation form)
Description copied from interface: FormBuilderService
Saves a form on the server

Specified by:
saveForm in interface FormBuilderService
Parameters:
form - The form to be saved

saveFormItem

public void saveFormItem(FormItemRepresentation formItem,
                         String formItemName)
Description copied from interface: FormBuilderService
Saves a UI component on the server

Specified by:
saveFormItem in interface FormBuilderService
Parameters:
formItem - the UI component to be saved
formItemName - the UI component name

deleteForm

public void deleteForm(FormRepresentation form)
Description copied from interface: FormBuilderService
Deletes a form from the server

Specified by:
deleteForm in interface FormBuilderService
Parameters:
form - The form to be deleted

deleteFile

public void deleteFile(String url)
                throws FormBuilderException
Specified by:
deleteFile in interface FormBuilderService
Throws:
FormBuilderException

getFiles

public void getFiles(List<String> types,
                     FilesLoadedHandler handler)
Specified by:
getFiles in interface FormBuilderService

deleteFormItem

public void deleteFormItem(String formItemName,
                           FormItemRepresentation formItem)
Description copied from interface: FormBuilderService
Deletes a UI component from the server

Specified by:
deleteFormItem in interface FormBuilderService
Parameters:
formItemName - The UI component name
formItem - the UI component to be deleted

generateForm

public void generateForm(FormRepresentation form,
                         String language,
                         Map<String,Object> inputs)
Description copied from interface: FormBuilderService
Translates a form. An event exposes where to retrieve the form from.

Specified by:
generateForm in interface FormBuilderService
Parameters:
form - Form to be translated
language - Language to translate the form

saveMenuItem

public void saveMenuItem(String groupName,
                         FBMenuItem item)
Description copied from interface: FormBuilderService
Saves a new (custom) menu item on the server

Specified by:
saveMenuItem in interface FormBuilderService
Parameters:
groupName - Group name of the new menu item
item - The new menu item to be saved

deleteMenuItem

public void deleteMenuItem(String groupName,
                           FBMenuItem item)
Description copied from interface: FormBuilderService
Deletes a custom menu item from the server

Specified by:
deleteMenuItem in interface FormBuilderService
Parameters:
groupName - Group name of the custom menu item to be deleted
item - The custom menu item to be deleted

getExistingIoAssociations

public void getExistingIoAssociations(String filter)
Description copied from interface: FormBuilderService
Returns the IoAssociations as matching on a simple string filter

Specified by:
getExistingIoAssociations in interface FormBuilderService
Parameters:
filter - a filter for a google-like search textfield

selectIoAssociation

public void selectIoAssociation(String pkgName,
                                String processName,
                                String taskName)
Description copied from interface: FormBuilderService
Fires a TaskSelectedEvent in case you can find the proper task in the server

Specified by:
selectIoAssociation in interface FormBuilderService
Parameters:
pkgName - the name of the package
processName - the name of the process
taskName - the name of the task

getExistingValidations

public void getExistingValidations()
Description copied from interface: FormBuilderService
Returns existing validations from the server

Specified by:
getExistingValidations in interface FormBuilderService

getForm

public void getForm(String formName)
Description copied from interface: FormBuilderService
Returns a single form

Specified by:
getForm in interface FormBuilderService
Parameters:
formName - the name of the form to be returned

getForms

public void getForms()
Description copied from interface: FormBuilderService
Returns all forms

Specified by:
getForms in interface FormBuilderService

populateRepresentationFactory

public void populateRepresentationFactory()
Description copied from interface: FormBuilderService
Populates the RepresentationFactory with the form items and representations that belong to them.

Specified by:
populateRepresentationFactory in interface FormBuilderService

loadFormTemplate

public void loadFormTemplate(FormRepresentation form,
                             String language)
Description copied from interface: FormBuilderService
Loads a file from the server that contains a given language's form template

Specified by:
loadFormTemplate in interface FormBuilderService
Parameters:
form - the form representation to create a template from
language - the result template expected language

toBasicForm

public FormRepresentation toBasicForm(TaskRef task)
Description copied from interface: FormBuilderService
Returns the form representation that basically describes a task

Specified by:
toBasicForm in interface FormBuilderService
Parameters:
task - a task to be described
Returns:
a form representation for that task

getUploadFileURL

public String getUploadFileURL()
Specified by:
getUploadFileURL in interface FormBuilderService
Returns:
URL for uploading files to guvnor

getUploadActionURL

public String getUploadActionURL()
Specified by:
getUploadActionURL in interface FormBuilderService
Returns:
URL for mocking uploading files for form instances


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.