Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

org.alfresco.repo.forms.processor
Interface Filter<ItemType,PersistType>

@org.alfresco.api.AlfrescoPublicApi
public interface Filter<ItemType,PersistType>
Interface definition for a filter which is called before and after a form is generated and persisted.
Author:
Gavin Cornwell

Method Summary
void
afterGenerate(ItemType item, List<String> fields, List<String> forcedFields, org.alfresco.repo.forms.Form form, Map<String,Object> context)
          Callback used to indicate that a form has just been generated for the given items and fields.
void
afterPersist(ItemType item, org.alfresco.repo.forms.FormData data, PersistType persistedObject)
          Callback used to indicate that the given form data was just persisted for the item and the given persistedObject was created or modified.
void
beforeGenerate(ItemType item, List<String> fields, List<String> forcedFields, org.alfresco.repo.forms.Form form, Map<String,Object> context)
          Callback used to indicate that a form is about to be generated for the given items and fields.
void
beforePersist(ItemType item, org.alfresco.repo.forms.FormData data)
          Callback used to indicate that the given form data is about to be persisted for the given item.
boolean
isActive()
          Determines whether the filter is active
Method Detail
isActive
boolean isActive()
Determines whether the filter is active
Returns:
true if the filter is active

beforeGenerate
void beforeGenerate(ItemType item,
                    List<String> fields,
                    List<String> forcedFields,
                    org.alfresco.repo.forms.Form form,
                    Map<String,Object> context)
Callback used to indicate that a form is about to be generated for the given items and fields.

NOTE: Filters all relating to the same type of form can cast the Object to a more appropriate object, for example all the Node based handlers can expect a NodeRef object and therefore cast to that.

Parameters:
item - The item to generate a Form for
fields - Restricted list of fields to include
forcedFields - List of fields to forcibly include
form - The Form object
context - Map representing optional context that can be used during retrieval of the form

afterGenerate
void afterGenerate(ItemType item,
                   List<String> fields,
                   List<String> forcedFields,
                   org.alfresco.repo.forms.Form form,
                   Map<String,Object> context)
Callback used to indicate that a form has just been generated for the given items and fields.

NOTE: Filters all relating to the same type of form can cast the Object to a more appropriate object, for example all the Node based handlers can expect a NodeRef object and therefore cast to that.

Parameters:
item - The item to generate a Form for
fields - Restricted list of fields to include
forcedFields - List of fields to forcibly include
form - The Form object
context - Map representing optional context that can be used during retrieval of the form

beforePersist
void beforePersist(ItemType item,
                   org.alfresco.repo.forms.FormData data)
Callback used to indicate that the given form data is about to be persisted for the given item.

NOTE: Filters all relating to the same type of form can cast the item Object to a more appropriate object, for example all the Node based handlers can expect a NodeRef object and therefore cast to that.

Parameters:
item - The item to persist the form data for
data - The form data

afterPersist
void afterPersist(ItemType item,
                  org.alfresco.repo.forms.FormData data,
                  PersistType persistedObject)
Callback used to indicate that the given form data was just persisted for the item and the given persistedObject was created or modified.

NOTE: Filters all relating to the same type of form can cast the item and persistedObject Objects to a more appropriate object, for example all the Node based handlers can expect a NodeRef object and therefore cast to that.

Parameters:
item - The item to persist the form data for
data - The form data
persistedObject - The object created or modified as a result of the form persistence

Overview  Package   Class  Use  Tree  Deprecated  Index  Help 
PREV CLASS   NEXT CLASS FRAMES    NO FRAMES    All Classes
SUMMARY: NESTED | FIELD | CONSTR | METHOD DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005–2018 Alfresco Software. All rights reserved.

Java API documentation generated with DocFlex/Javadoc 1.6.1 using JavadocPro template set.