|
www.element4solution.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface AEP_EditingDataDescriptor_Intf
AEP - Application Exit Point during editing using E4EditingElement.
A detailed description can be found at E4EditingElement.
A default implementation exists at AEP_EditingDataDescriptor.
E4EditingElement,
E4EditingDataDescriptor| Field Summary | |
|---|---|
static char |
MODE_DELETE
Delete Mode. |
static char |
MODE_DISPLAY_FOR_DELETE
Deprecated. Use MODE_DELETE instead |
static char |
MODE_DUPLICATE
Duplicate Mode. |
static char |
MODE_INSERT
Insert Mode |
static char |
MODE_UPDATE
Update Mode. |
static java.lang.String |
PARAM_PREFIX_DUPLICATE
A parameter prefix for hidden fields pointing out to the original values. |
| Method Summary | |
|---|---|
void |
afterDelete(BODY body,
E4Fieldset fieldset,
E4DBConnection_Intf con)
This function will be called after the SQL-DELETE statement to give a possibility to perform additional database related tasks. |
void |
afterDuplicate(BODY body,
HIDDENFIELD[] originalValues,
E4Fieldset fieldset,
E4DBConnection_Intf con)
This method will be called after duplication of a record, if enabled E4EditingDataDescriptor.enableDuplicate(). |
void |
afterInsert(BODY body,
E4Fieldset fieldset,
E4DBConnection_Intf con)
This function will be called after the SQL-INSERT statement to give a possibility to perform additional database related tasks. |
void |
afterUpdate(BODY body,
E4Fieldset fieldset,
E4DBConnection_Intf con)
This function will be called after the SQL-UPDATE statement to give a possibility to perform additional database related tasks. |
boolean |
beforeDelete(E4Fieldset fieldset)
This function will be called before SQL-DELETE given the possibility to chancel the delete process. |
boolean |
beforeDuplicate(E4Fieldset fieldset)
This function will be called before SQL-INSERT for update given the possibility to chancel the insert on duplicate process. |
boolean |
beforeInsert(E4Fieldset fieldset)
This function will be called before SQL-INSERT given the possibility to chancel the insert process. |
boolean |
beforeUpdate(E4Fieldset fieldset)
This function will be called before SQL-UPDATE given the possibility to chancel the update process. |
boolean |
canDelete(E4DBSelect_Intf select)
Check, if the record can be deleted (while displaying it in the listing table and offering the delete image). |
boolean |
canDuplicate(E4DBSelect_Intf select)
Check, if the record can be duplicated. |
boolean |
canEdit(E4DBSelect_Intf select)
Check, if the record can be edited (while displaying it in the listing table and offering the delete image). |
void |
createFieldset_Search(E4Fieldset fieldset)
This function is called after the fieldset for search is created. |
void |
createFieldset(E4Fieldset fieldset,
char mode)
This function is called after the fieldset for insert, update or delete is created. |
E4DBReference[] |
modifyDeleteExecutionList(E4DBReference[] cols)
Modify the list of tables/columns where master/detail deletion shall be performed. |
E4DBReference[] |
modifyDeleteIntegrityList(E4DBReference[] cols)
Modify the list of tables/columns where integrity check shall be performed before a delete operation takes place. |
void |
pageEnd(BODY body,
char mode,
E4CgiParams params)
This function is called initially, after page loading and fieldset added. |
boolean |
pageStart(BODY body,
char mode,
E4CgiParams params)
This function is called initially, after page loading but before the fieldset is added. |
void |
setForm(FORM form)
|
void |
setServlet(E4ServletImplementation_Intf servlet)
The init method is called to handle the actual valid servlet to this AEP, it will be called before any of the other methods is involved. |
| Field Detail |
|---|
static final char MODE_UPDATE
MODE_INSERT,
MODE_DELETE,
MODE_DUPLICATE,
createFieldset(E4Fieldset, char),
beforeUpdate(E4Fieldset),
afterUpdate(BODY, E4Fieldset, E4DBConnection_Intf),
Constant Field Valuesstatic final char MODE_INSERT
MODE_UPDATE,
MODE_DELETE,
MODE_DUPLICATE,
createFieldset(E4Fieldset, char),
beforeInsert(E4Fieldset),
afterInsert(BODY, E4Fieldset, E4DBConnection_Intf),
Constant Field Valuesstatic final char MODE_DELETE
MODE_INSERT,
MODE_UPDATE,
MODE_DUPLICATE,
createFieldset(E4Fieldset, char),
beforeDelete(E4Fieldset),
afterDelete(BODY, E4Fieldset, E4DBConnection_Intf),
Constant Field Valuesstatic final char MODE_DISPLAY_FOR_DELETE
MODE_DELETE insteadstatic final char MODE_DUPLICATE
MODE_INSERT,
MODE_UPDATE,
MODE_DELETE,
createFieldset(E4Fieldset, char),
E4EditingDataDescriptor.enableDuplicate(),
afterDuplicate(e4s.html.BODY, e4s.html.input.extended.HIDDENFIELD[], e4s.html.input.extended.E4Fieldset, e4s.db.E4DBConnection_Intf),
canDuplicate(e4s.db.E4DBSelect_Intf),
#beforeDuplicate(e4s.html.E4Fieldset),
Constant Field Valuesstatic final java.lang.String PARAM_PREFIX_DUPLICATE
AEP_EditingDataDescriptor.extractPresetField4Duplication(E4Fieldset, e4s.html.input.extended.E4InputFieldName_Intf),
AEP_EditingDataDescriptor.extractPresetFields4Duplication(E4Fieldset),
MODE_DUPLICATE,
afterDuplicate(BODY, HIDDENFIELD[], E4Fieldset, E4DBConnection_Intf),
Constant Field Values| Method Detail |
|---|
void setServlet(E4ServletImplementation_Intf servlet)
servlet - the actual servlet
void createFieldset(E4Fieldset fieldset,
char mode)
throws java.lang.Exception
E4Fieldset parameter has been set at this point, but additionally
you can modify it here before display starts.
fieldset - the values from the input formmode - the update/display mode (MODE_INSERT, MODE_UPDATE or MODE_DELETE).
java.lang.Exceptione4s.html.editing.AEP_EditingDataDescriptor#createFieldset()
void createFieldset_Search(E4Fieldset fieldset)
throws java.lang.Exception
E4Fieldset parameter has been set at this point, but additionally
you can modify it here before display starts.
fieldset - the values from the input form
java.lang.Exception
boolean beforeInsert(E4Fieldset fieldset)
throws java.lang.Exception
E4Fieldset have set their
values. Those values can be read out, and depending on that the insert process can be stopped by
returning a value of false, which causes the form to still appear on the screen.
fieldset - the values from the input form
java.lang.Exceptione4s.html.editing.AEP_EditingDataDescriptorbeforeInsert,
afterInsert(e4s.html.BODY, e4s.html.input.extended.E4Fieldset, e4s.db.E4DBConnection_Intf),
beforeUpdate(e4s.html.input.extended.E4Fieldset),
beforeDelete(e4s.html.input.extended.E4Fieldset),
beforeDuplicate(e4s.html.input.extended.E4Fieldset)
boolean beforeDuplicate(E4Fieldset fieldset)
throws java.lang.Exception
E4Fieldset have set their
values. Those values can be read out, and depending on that the insert process can be stopped by
returning a value of false, which causes the form to still appear on the screen.
fieldset - the values from the input formfieldset - the validated fieldset
java.lang.ExceptionE4EditingDataDescriptor.enableDuplicate(),
afterDuplicate(e4s.html.BODY, e4s.html.input.extended.HIDDENFIELD[], e4s.html.input.extended.E4Fieldset, e4s.db.E4DBConnection_Intf),
canDuplicate(e4s.db.E4DBSelect_Intf),
E4ModuleEditingHandling02.duplicateRecord,
MODE_DUPLICATE,
#beforeDelete(e4s.html.E4Fieldset),
#beforeInsert(e4s.html.E4Fieldset),
#beforeUpdate(e4s.html.E4Fieldset)
void afterInsert(BODY body,
E4Fieldset fieldset,
E4DBConnection_Intf con)
throws java.lang.Exception
E4Fieldset have set their
values and the statement on SQL level has still been processed, but the transaction still remains open,
this means that a rollback would be possible at this point. For all additional database tasks, use the
transaction specified here.
A default implementation can be found here: AEP_EditingDataDescriptor.afterInsert(BODY, E4Fieldset, E4DBConnection_Intf).
body - the related BODY element to provide additional output if requiredcon - the current database connection in transaction modefieldset - the values from the input form
java.lang.ExceptionAEP_EditingDataDescriptor.afterInsert(e4s.html.BODY, e4s.html.input.extended.E4Fieldset, e4s.db.E4DBConnection_Intf),
beforeInsert(e4s.html.input.extended.E4Fieldset),
afterUpdate(e4s.html.BODY, e4s.html.input.extended.E4Fieldset, e4s.db.E4DBConnection_Intf),
afterDelete(e4s.html.BODY, e4s.html.input.extended.E4Fieldset, e4s.db.E4DBConnection_Intf)
boolean beforeUpdate(E4Fieldset fieldset)
throws java.lang.Exception
E4Fieldset have set their
values. Those values can be read out, and depending on that the update process can be stopped by
returning a value of false, which causes to form to appear on the screen.
fieldset - the values from the input form
java.lang.Exceptione4s.html.editing.AEP_EditingDataDescriptorbeforeUpdate,
afterUpdate(e4s.html.BODY, e4s.html.input.extended.E4Fieldset, e4s.db.E4DBConnection_Intf),
beforeInsert(e4s.html.input.extended.E4Fieldset),
beforeDelete(e4s.html.input.extended.E4Fieldset)
void afterUpdate(BODY body,
E4Fieldset fieldset,
E4DBConnection_Intf con)
throws java.lang.Exception
E4Fieldset have set their
values and the statement on SQL level has still been processed, but the transaction still remains open,
this means that a rollback would be possible at this point. For all additional database tasks, use the
transaction specified here.
A default implementation can be found here: AEP_EditingDataDescriptor.afterUpdate(BODY, E4Fieldset, E4DBConnection_Intf).
body - the related BODY element to provide additional output if requiredcon - the current database connection in transaction modefieldset - the values from the input form
java.lang.Exceptione4s.html.editing.AEP_EditingDataDescriptorafterUpdate,
#beforeUpdate(),
afterInsert(e4s.html.BODY, e4s.html.input.extended.E4Fieldset, e4s.db.E4DBConnection_Intf),
afterDelete(e4s.html.BODY, e4s.html.input.extended.E4Fieldset, e4s.db.E4DBConnection_Intf)
boolean beforeDelete(E4Fieldset fieldset)
throws java.lang.Exception
E4Fieldset have set their
values. Those values can be read out, and depending on that the delete process can be stopped by
returning a value of false, which causes to form to appear on the screen. This is not the point
to add referential delete, this should be done in afterDelete(e4s.html.BODY, e4s.html.input.extended.E4Fieldset, e4s.db.E4DBConnection_Intf) if required.
fieldset - the values from the input form
java.lang.Exceptione4s.html.editing.AEP_EditingDataDescriptorbeforeDelete,
afterDelete(BODY, E4Fieldset, E4DBConnection_Intf),
beforeInsert(E4Fieldset),
beforeUpdate(E4Fieldset),
afterDuplicate(BODY, HIDDENFIELD[], E4Fieldset, E4DBConnection_Intf),
canDelete(E4DBSelect_Intf)
void afterDelete(BODY body,
E4Fieldset fieldset,
E4DBConnection_Intf con)
throws java.lang.Exception
E4Fieldset have set their
values and the statement on SQL level has still been processed, but the transaction still remains open,
this means that a rollback would be possible at this point. For all additional database tasks, use the
transaction specified here.
A default implementation can be found here: {@link e4s.html.editing.AEP_EditingDataDescriptor#afterDelete(BODY, E4Fieldset, E4DBConnection_Intf)
body - the related BODY element to provide additional output if requiredcon - the current database connection in transaction modefieldset - the values from the input form
java.lang.ExceptionAEP_EditingDataDescriptor.afterDelete(e4s.html.BODY, e4s.html.input.extended.E4Fieldset, e4s.db.E4DBConnection_Intf),
canDelete(E4DBSelect_Intf),
beforeDelete(E4Fieldset),
afterUpdate(BODY, E4Fieldset, E4DBConnection_Intf),
afterInsert(BODY, E4Fieldset, E4DBConnection_Intf),
afterDuplicate(BODY, HIDDENFIELD[], E4Fieldset, E4DBConnection_Intf)
E4DBReference[] modifyDeleteIntegrityList(E4DBReference[] cols)
throws java.lang.Exception
public static E4DBTypeUsage[] getUsage()functions in the user defined, generated datatypes. Additionally, there can be a defined reference in the data dictionary. When editing a table, it is known which field is the index field. So this is compared to the column list, a SQL select will be performed and if at least one such a value exists in the table, then deletion will be aborted and an error message is displayed. This mechanism also requires
e4s.html.E4EditingDataDescriptor#setCheckReferencesOnDelete()
set to true.
In some cases, you want this feature and in some you don't. This interface function now enables
to decide, which tables require integrity checking and which do not.
cols - an array with column definitions, might be null
java.lang.ExceptionE4DBIntegrity.hasAnyData(e4s.db.E4DBTypeUsage[], e4s.db.E4DBTableName, e4s.application.E4ApplObj_Intf, e4s.util.E4String),
E4DBReference.removeReference(e4s.db.E4DBReference[], e4s.db.E4DBTableName),
E4DBReference.addUsage(e4s.db.E4DBReference[], e4s.db.E4DBReference),
E4DBSelect_Intf.getReferenceLookup(e4s.db.E4DBColumnName),
e4s.html.E4EditingDataDescriptor#getCheckReferencesOnDelete(),
e4s.html.E4EditingDataDescriptor#setCheckReferencesOnDelete()
E4DBReference[] modifyDeleteExecutionList(E4DBReference[] cols)
throws java.lang.Exception
public static E4DBTypeUsage[] getUsage()functions in the user defined, generated datatypes. Additionally, there can be a defined reference in the data dictionary. When editing a table, it is known which field is the index field. So this is compared to the column list, a SQL select will be performed and if at least one such a value exists in the table, then deletion will be aborted and an error message is displayed. This mechanism also requires
e4s.html.E4EditingDataDescriptor#setCheckReferencesOnDelete()
set to true.
In some cases, you want this feature and in some you don't. This interface function now enables
to decide, which tables require integrity checking and which do not.
cols - an array with column definitions, might be null
java.lang.ExceptionE4DBReference.removeReference(e4s.db.E4DBReference[], e4s.db.E4DBTableName),
E4DBReference.addUsage(e4s.db.E4DBReference[], e4s.db.E4DBReference),
E4DBSelect_Intf.getReferenceDelete(e4s.db.E4DBColumnName)
boolean canDelete(E4DBSelect_Intf select)
throws java.lang.Exception
select - the selection interface representing the current record
java.lang.ExceptioncanEdit(E4DBSelect_Intf),
canDuplicate(E4DBSelect_Intf),
AEP_EditingDataDescriptor.canDelete(E4DBSelect_Intf)
boolean canEdit(E4DBSelect_Intf select)
throws java.lang.Exception
select - the selection interface representing the current record
java.lang.ExceptioncanDelete(E4DBSelect_Intf),
canDuplicate(E4DBSelect_Intf),
AEP_EditingDataDescriptor.canEdit(E4DBSelect_Intf)
boolean canDuplicate(E4DBSelect_Intf select)
throws java.lang.Exception
select - the selection interface representing the current record
java.lang.ExceptionE4EditingDataDescriptor.enableDuplicate(),
afterDuplicate(e4s.html.BODY, e4s.html.input.extended.HIDDENFIELD[], e4s.html.input.extended.E4Fieldset, e4s.db.E4DBConnection_Intf),
beforeDuplicate(e4s.html.input.extended.E4Fieldset),
E4ModuleEditingHandling02.duplicateRecord,
E4Images.duplicate_1,
MODE_DUPLICATE
boolean pageStart(BODY body,
char mode,
E4CgiParams params)
throws java.lang.Exception
body - the BODY context for any additional outputsmode - the update/display mode (MODE_INSERT, MODE_UPDATE or MODE_DELETE).
java.lang.Exception
void pageEnd(BODY body,
char mode,
E4CgiParams params)
throws java.lang.Exception
body - the BODY context for any additional outputsmode - the update/display mode (MODE_INSERT, MODE_UPDATE or MODE_DELETE).
java.lang.Exceptionvoid setForm(FORM form)
void afterDuplicate(BODY body,
HIDDENFIELD[] originalValues,
E4Fieldset fieldset,
E4DBConnection_Intf con)
throws java.lang.Exception
E4EditingDataDescriptor.enableDuplicate(). This is a good place, to
copy (duplicate) related records if needed. A default implementation can be found here:
AEP_EditingDataDescriptor.afterDuplicate(BODY, HIDDENFIELD[], E4Fieldset, E4DBConnection_Intf)
body - you can write out some informations for the user right hereoriginalValues - is an array of index fields that point out to the existing record (the copy-from-source), the order can be
different AEP_EditingDataDescriptor.extractPresetField4Duplication(E4Fieldset, e4s.html.input.extended.E4InputFieldName_Intf),
AEP_EditingDataDescriptor.extractPresetFields4Duplication(E4Fieldset).fieldset - the validated fieldset with replaced index values on auto-increment fields, if applicablecon - the database connection (you should refer to it as this might be a transaction)
java.lang.ExceptionE4EditingDataDescriptor.enableDuplicate(),
afterDuplicate(e4s.html.BODY, e4s.html.input.extended.HIDDENFIELD[], e4s.html.input.extended.E4Fieldset, e4s.db.E4DBConnection_Intf),
beforeDuplicate(e4s.html.input.extended.E4Fieldset),
canDuplicate(e4s.db.E4DBSelect_Intf),
E4ModuleEditingHandling02.duplicateRecord,
MODE_DUPLICATE,
PARAM_PREFIX_DUPLICATE
|
www.element4solution.com | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||