jBPM distribution 6.0.0.CR1

org.jbpm.form.builder.services.impl
Class FormBuilderServiceImpl

java.lang.Object
  extended by org.jbpm.form.builder.services.impl.FormBuilderServiceImpl
All Implemented Interfaces:
FormBuilderService

@ApplicationScoped
public class FormBuilderServiceImpl
extends Object
implements FormBuilderService


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.jbpm.form.builder.services.api.FormBuilderService
FormBuilderService.RolesResponseHandler
 
Constructor Summary
FormBuilderServiceImpl()
           
 
Method Summary
 void applySettings(Settings settings)
           
 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 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 getForm(String formName)
          Returns a single form
 String getFormDisplay()
           
 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()
           
 FormRepresentation loadForm(String json)
           
 void loadFormTemplate(FormRepresentation form, String language)
          Loads a file from the server that contains a given language's form template
 void loadSettings()
           
 void logout()
           
 void populateRepresentationFactory()
          Populates the RepresentationFactory with the form items and representations that belong to them.
 String saveForm(FormRepresentation form)
          Saves a form on the server
 String saveFormGWT(Map<String,Object> form)
           
 void saveFormItem(FormItemRepresentation formItem, String formItemName)
          Saves a UI component 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormBuilderServiceImpl

public FormBuilderServiceImpl()
Method Detail

getMenuItems

public void getMenuItems()
                  throws FormBuilderServiceException
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
Throws:
FormBuilderServiceException

getMenuOptions

public void getMenuOptions()
                    throws FormBuilderServiceException
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
Throws:
FormBuilderServiceException

saveFormGWT

public String saveFormGWT(Map<String,Object> form)
                   throws FormBuilderServiceException
Throws:
FormBuilderServiceException

saveForm

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

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

saveFormItem

public void saveFormItem(FormItemRepresentation formItem,
                         String formItemName)
                  throws FormBuilderServiceException
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
Throws:
FormBuilderServiceException

deleteForm

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

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

deleteFile

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

deleteFormItem

public void deleteFormItem(String formItemName,
                           FormItemRepresentation formItem)
                    throws FormBuilderServiceException
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
Throws:
FormBuilderServiceException

generateForm

public void generateForm(FormRepresentation form,
                         String language,
                         Map<String,Object> inputs)
                  throws FormBuilderServiceException
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
Throws:
FormBuilderServiceException

getExistingIoAssociations

public void getExistingIoAssociations(String filter)
                               throws FormBuilderServiceException
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
Throws:
FormBuilderServiceException

selectIoAssociation

public void selectIoAssociation(String pkgName,
                                String processName,
                                String taskName)
                         throws FormBuilderServiceException
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
Throws:
FormBuilderServiceException

getExistingValidations

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

Specified by:
getExistingValidations in interface FormBuilderService
Throws:
FormBuilderServiceException

getForm

public void getForm(String formName)
             throws FormBuilderServiceException
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
Throws:
FormBuilderServiceException

getForms

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

Specified by:
getForms in interface FormBuilderService
Throws:
FormBuilderServiceException

populateRepresentationFactory

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

Specified by:
populateRepresentationFactory in interface FormBuilderService
Throws:
FormBuilderServiceException

loadFormTemplate

public void loadFormTemplate(FormRepresentation form,
                             String language)
                      throws FormBuilderServiceException
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
Throws:
FormBuilderServiceException

getCurrentRoles

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

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

setPackageName

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

logout

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

applySettings

public void applySettings(Settings settings)
Specified by:
applySettings in interface FormBuilderService

loadSettings

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

getFormDisplay

public String getFormDisplay()
Specified by:
getFormDisplay in interface FormBuilderService

loadForm

public FormRepresentation loadForm(String json)
Specified by:
loadForm in interface FormBuilderService

jBPM distribution 6.0.0.CR1

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