Package com.simplicite.util
Class ScriptedObjectDB
- java.lang.Object
-
- com.simplicite.util.ObjectCore
-
- com.simplicite.util.ObjectDB
-
- com.simplicite.util.ScriptedObjectDB
-
- All Implemented Interfaces:
com.simplicite.util.engine.CacheInterface
,java.io.Serializable
- Direct Known Subclasses:
ObjectService
public class ScriptedObjectDB extends ObjectDB
Business object stored in database with scripted implementation- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.simplicite.util.ObjectDB
ObjectDB.SearchCallback<T>
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.List<java.lang.String>
SCRIPTED_HOOKS
Scripted hooks list-
Fields inherited from class com.simplicite.util.ObjectCore
CONTEXT_ACTION, CONTEXT_AGENDA, CONTEXT_ASSOCIATE, CONTEXT_COPY, CONTEXT_CREATE, CONTEXT_CROSSTAB, CONTEXT_DATAMAPSELECT, CONTEXT_DELETE, CONTEXT_EXPORT, CONTEXT_IMPORT, CONTEXT_LIST, CONTEXT_NONE, CONTEXT_PANELLIST, CONTEXT_PLACEMAP, CONTEXT_POSTVALIDATE, CONTEXT_PREVALIDATE, CONTEXT_PRINTTMPL, CONTEXT_REFSELECT, CONTEXT_SEARCH, CONTEXT_STATETRANSITION, CONTEXT_UPDATE, CONTEXT_UPDATEALL, DB_DERBY, DB_H2, DB_HSQLDB, DB_MSSQL, DB_MYSQL, DB_ORACLE, DB_POSTGRESQL, DB_UNKNOWN, DEL_CASCAD, DEL_IGNORE, DEL_NULL, DEL_RESTRICT, FORM_LAYOUT_COMPACT, FORM_LAYOUT_DEFAULT, LIST_EDIT_ADD, LIST_EDIT_ROWS, LIST_EDIT_UPSERT, PREDEF_SEARCH_NONE, PREDEF_SEARCH_ONLIST, PREDEF_SEARCH_USE_EDIT, PREDEF_SEARCH_USE_ONLY, SEARCH_DIALOG, SEARCH_DOCK, SEARCH_HIDE, SEARCH_LIST, TIMESTAMP_BLOKING, TIMESTAMP_NON_BLOKING, TIMESTAMP_NONE, TIMESTAMP_OPTIMISTIC, TYPE_QUERY, TYPE_SERVICE, TYPE_SERVICE_LDAP, TYPE_SERVICE_MONGODB, TYPE_SERVICE_OPENDATASOFT, TYPE_SERVICE_REST, TYPE_SERVICE_SALESFORCE, TYPE_SERVICE_SERVICENOW, TYPE_SERVICE_SIMPLICITE, VIEW_MODE_ACCORDION, VIEW_MODE_COLLAPSED, VIEW_MODE_EXTENDED, VIEW_MODE_TABS, VIEW_MODE_TABS_VERTICAL
-
-
Constructor Summary
Constructors Constructor Description ScriptedObjectDB()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
applyConstraints(int context)
Apply all dynamic constraintsvoid
applyFieldConstraints(int context)
Apply all constraints on fieldsvoid
applyObjectConstraints(int context)
Apply all dynamic constraints on objectvoid
applyStaticConstraints()
Apply all static constraints on loadvoid
applyTargetConstraints(int context)
Apply all constraints on targets (action, link or view)boolean
canCreateOnLink(ObjectField field)
Allow create on specific link ?boolean
canFollowLink(ObjectField field)
Allow follow a specific link ?boolean
canReference(java.lang.String object, java.lang.String field)
Hook called to check if a referenced object can be displayedboolean
canUpdateAll(ObjectField f)
True if the field is bulk updatable, to override for specific behavior
By default, returns true if:
- the field (or its foreign key) is visible and updatable,
- not the single functional key in the object,
- for status field, if the selection is in a same statusvoid
checkExpression(java.lang.String expr)
Prepares an expression and apply structural and elementary syntax checks, this method is only intended to this basic usageboolean
checkObjectPropConstraints(int context, char objectProp)
Check object constraints for propertyjava.lang.String
customAlert(Alert a, java.lang.String subject, java.lang.String body, java.util.List<DocumentDB> attachments)
Hook for sending the alert using a custom mediavoid
docuSign(DocSignProvider.DocSignStatus doc)
DocuSign web-hook https://developers.docusign.com/esign-rest-api/code-examples/webhook-statusjava.lang.Object
evalExpression(java.lang.String expr, int context, java.lang.String[] row, java.util.Map<java.lang.String,java.lang.Object> in, java.util.Map<java.lang.String,java.lang.Object> out)
Prepare and evaluate an expression (see prepareExpression for details on tokens)java.util.List<java.lang.String>
fieldCompletion(java.lang.String field, java.lang.String query, java.lang.String context)
Hook to override the default field completion (Lucene or SQL search on field)
- Usefull to implement an editable select-box, to call a WebService and/or to populate a specific list of choice
- On client-side, use the field_completed(value) hook in the template to handle the selected value by userjava.lang.String
getAgendaDay(Agenda a, java.util.Date d)
Deprecated.java.lang.String
getAgendaLabel(Agenda a, ObjectField f)
Deprecated.java.lang.String
getAgendaSelector(Agenda a, java.lang.String selector)
Deprecated.java.lang.String
getAgendaValue(Agenda a, ObjectField f, java.lang.String val)
Deprecated.java.lang.String
getAgendaWeek(Agenda a, java.util.List<java.lang.String> days)
Deprecated.long
getCount(int maxRows)
Return the records count with the current search specification and filtersjava.lang.String
getCtxHelp(java.lang.String helpContext)
Contextual helpjava.util.Date
getDeadlineDate(java.lang.String row_id, java.lang.String state, java.lang.String update_dt, int timeout)
Eval the timeout date of the object state (can be overrided with a specific rule)char
getEmailRecipientType(java.lang.String alert, java.lang.String email, char type)
Hook to override the recipient type (TO/CC/BCC)java.lang.String
getExportFileName(java.lang.String media, java.lang.String name, java.lang.String[] row)
Export file name: default is the object label or user key, this hook can be overridden to change the output name.char
getGroupEmailRecipientType(java.lang.String alert, java.lang.String group, char type)
Hook to override the recipient type (TO/CC/BCC) of a groupjava.lang.String
getHelp()
Get main object helpjava.lang.String
getImage(ObjectField f, java.lang.String val)
Get the field icon from single value.java.lang.String
getImage(ObjectField f, java.lang.String[] row)
Get the field icon from values array.java.lang.String
getImageTree(TreeView tv, java.lang.String[] row)
Hook to assign one icon to a treeview itemjava.lang.String
getMappedExportPath(java.lang.String[] row)
Get the mapped export file pathjava.lang.String
getMappedFilePath(ObjectField f)
Get the mapped file path for specified fieldjava.util.List<PredefinedSearch>
getPredefinedSearches()
Hook to get accessible predefined searches.SocialShareData
getSocialShareData()
Hook to override share information to send to social medias.java.lang.String
getStyle(ObjectField f, double d)
Hook to specify field style for a crosstab valuejava.lang.String
getStyle(ObjectField f, java.lang.String[] row)
Gets specified field style from values array, by default call getStyle for the field value
May be override to change the style with specific business rulesjava.lang.String
getStyleTree(TreeView tv, java.lang.String[] row)
Hook to assign a style to a treeview itemjava.lang.String[]
getTargetObject(java.lang.String rowId, java.lang.String[] row)
Hook to substitute the current object/instance/rowId to another target object.java.lang.String
getUserKeyLabel(java.lang.String[] row)
Build a custom label to represent the user key of the record
If row is null, the selected fields are used.java.lang.String
getUserKeySearch(java.lang.String[] row)
Build a label to represent the searchable fields
If row is null, the selected fields are used.void
initAction(Action action)
Hook to init the Action fields before the confirm dialog.void
initAgenda(Agenda agenda)
Hook to init an agendavoid
initAssociate(ObjectDB parent)
Hook to init the associationvoid
initCopy()
Hook to init the copyvoid
initCreate()
Hook to init the creationvoid
initCrosstab(java.lang.String crosstabName)
Hook to init a pivot tablevoid
initDataMapSelect(java.lang.String dataMapName, ObjectDB parent)
Hook to init the data mapping selectionvoid
initDelete()
Hook to init the Delete before delete dialogvoid
initExport()
Hook to init the Export before export dialogvoid
initList(ObjectDB parent)
Hook to init the listvoid
initPlaceMap(PlaceMap placemap)
Hook to init a place mapvoid
initPrintTemplate(java.lang.String printTemplateName)
Hook to init a publication templatevoid
initRefSelect(ObjectDB parent)
Hook to init the reference selectionvoid
initSearch()
Hook to init the searchvoid
initTimesheet(Timesheet ts)
Hook to change timesheet before renderingvoid
initUpdate()
Hook to init the updatejava.lang.String
invokeAction(Action action, java.util.Map<java.lang.String,java.lang.String> params)
Action call with optional parametersvoid
invokeCallback(java.lang.String callbackName)
Simple callback method callvoid
invokeCallback(java.lang.String callbackName, java.util.Map<java.lang.String,java.lang.String> params)
Simple callback method calljava.lang.Object
invokeMethod(java.lang.String methodName, java.lang.Class<?>[] paramTypes, java.lang.Object[] paramValues)
Method call with argsjava.lang.Object
invokePrint(PrintTemplate prt)
Publication method call.boolean
isActionEnable(java.lang.String[] row, java.lang.String action)
Hook to check if one action is available for a specific record
This method must be called to check if the action is available for the userboolean
isCopyEnable(java.lang.String[] row)
Hook to check if the copy action is available for a specified record
This method must be called to check if the action is available for the user and the specified recordboolean
isCreateEnable()
Hook to check if the create action is available
This method must be called to check if the action is available for the userboolean
isCrosstabEnable(java.lang.String crosstab)
Hook to check if crosstab is available
This method must be called to check if the crosstab is available for the userboolean
isDeleteEnable(java.lang.String[] row)
Hook to check if the delete action is available for a specified record
This method must be called to check if the action is available for the user and the specified recordjava.lang.String
isExportAllowed(java.lang.String mode, java.lang.String media, java.lang.String rowId)
Is requested export allowed?boolean
isHistoric()
Is historization required?java.lang.String
isMergeEnable(java.util.List<java.lang.String> ids)
Hook to tell if selected ids are mergeableboolean
isMergeMaster()
Hook to tell is current record the merge master ?boolean
isOpenEnable(java.lang.String[] row)
Hook to check if the open action is available for a specific record
This method must be called to check if the action is available for the userboolean
isPrintTemplateEnable(java.lang.String[] row, java.lang.String printTemplate)
Hook to check if publication template is available for a specific record
This method must be called to check if the publication template is available for the userboolean
isStateTransitionEnable(java.lang.String fromStatus, java.lang.String toStatus)
Hook called when building the list of possible state transition
It may be useful to implement specific state transition condition rulesboolean
isUndoable(java.lang.String action)
Hook to allow undo/redo on the objectboolean
isUpdateEnable(java.lang.String[] row)
Hook to check if the update action is available for a specified record
This method must be called to check if the action is available for the user and the specified recordjava.lang.String
postAlert(Alert a)
Hook before after sending the alertjava.lang.String
postCreate()
Hook called after the database creationjava.util.List<java.lang.String[]>
postCrosstabSearch(Crosstab ctb, java.util.List<java.lang.String[]> rows)
Hook called after pivot table search with the fields filters (by default it calls the postSearch hook)
It may be useful to calculate fields or to change the recordsjava.lang.String
postDelete()
Hook called after the database deletionjava.lang.String
postDeleteAll()
Hook called after bulk deletejava.util.List<java.lang.String[]>
postExport(java.util.List<java.lang.String[]> rows)
Hook called after search in export of data.java.lang.String
postImport()
Hook called after processing object import
It may be useful to execute business rules after actually processing the importvoid
postLoad()
Hook called after loading the object definitionjava.util.List<java.lang.String[]>
postObjectSearch(java.util.List<java.lang.String[]> rows)
Hook called after search of object reference
It may be useful to calculate fields or to change the recordsvoid
postRedo()
Hook called after redojava.lang.String
postSave()
Hook called after the database savevoid
postSavePredefinedSearch(PredefinedSearch ps)
Hook called after predefined-search savejava.util.List<java.lang.String>
postSaveTimesheet(Timesheet ts)
Hook called after Timesheet savejava.util.List<java.lang.String[]>
postSearch(java.util.List<java.lang.String[]> rows)
Hook called after search with the fields filters
It may be useful to calculate fields or to change the recordsjava.lang.String[]
postSearchRow(java.lang.String[] row)
Hook called after search for each record
It may be useful to calculate fields or to change the record valuesvoid
postSelect(java.lang.String rowId, boolean copy)
Hook called after a single row selectionvoid
postUndo()
Hook called after undojava.lang.String
postUpdate()
Hook called after the database updatevoid
postUpdateAll()
Deprecated.Use preUpdateAll with paramtersvoid
postUpdateAll(Parameters params)
Hook called after bulk updatejava.util.List<java.lang.String>
postValidate()
Hook called after system validation
It may be useful to check specific rules before updatejava.util.List<java.lang.String>
postValidateSearch()
Hook called after search validation with the fields filters
It may be useful to check filtersjava.lang.String
preAlert(Alert a)
Hook before before sending the alertvoid
preCount()
Hook called before count with the fields filters (by default it calls the preSearch hook)
It may be useful to add some specific filtersjava.lang.String
preCreate()
Hook called before the database creationvoid
preCrosstabSearch(Crosstab ctb)
Hook called before pivot table search with the fields filters (by default it calls the preSearch hook)
It may be useful to add some specific filtersjava.lang.String
preDelete()
Hook called before the database deletionjava.lang.String
preDeleteAll()
Hook called before bulk deletevoid
preExport()
Hook called before search in export of data
It may be useful to add some specific filtersjava.lang.String
preImport()
Hook called before processing object import
It may be useful to add data to imported data
(attention : imported data cannot be changed here)
or to execute business rules before actually processing the importvoid
preObjectSearch()
Hook called before search of object reference
It may be useful to add some specific filtersboolean
preRedo()
Hook called before redojava.lang.String
preSave()
Hook called before the database savejava.lang.String
preSavePredefinedSearch(PredefinedSearch ps)
Hook called before predefined-search savejava.util.List<java.lang.String>
preSaveTimesheet(Timesheet ts)
Hook called before Timesheet savevoid
preSearch()
Hook called before search with the fields filters
It may be useful to add some specific filtersvoid
preSelect(java.lang.String rowId, boolean copy)
Hook called before a single row selectionjava.util.List<java.lang.String>
preStateTransition(java.lang.String fromStatus, java.lang.String toStatus)
Hook called just before pre validate hook in case of a state transition
It may be useful to isolate specific state transition pre validation rules from other pre validation rulesboolean
preUndo()
Hook called before undojava.lang.String
preUpdate()
Hook called before the database updatejava.lang.String
preUpdateAll()
Deprecated.Use preUpdateAll with paramtersjava.lang.String
preUpdateAll(Parameters params)
Hook called before bulk updatejava.util.List<java.lang.String>
preValidate()
Hook called before system validation
It may be useful to force/calculate mandatory valuesjava.util.List<java.lang.String>
preValidateSearch()
Hook called before search validation with the fields filters
It may be useful to check filtersjava.lang.Object
printed(PrintTemplate prt, java.lang.String rowId, java.lang.Object printed)
Callback hook when published.boolean
spamEmail(java.lang.String alert, java.lang.String group, java.lang.String email)
Hook called to check if the email is a recipient of the alertboolean
spamGroup(java.lang.String alert, java.lang.String group)
Hook called to check if the group is a recipient of the alertjava.lang.String
unitTests()
Unit tests-
Methods inherited from class com.simplicite.util.ObjectDB
addLink, addLinkMetaObject, buildTreeList, canUpdateAllEnum, checkCreateConstraints, checkCreateVisibilities, checkDelete, checkDeleteConstraints, checkDeleteVisibilities, checkUpdateConstraints, checkUpdateVisibilities, clear, completeForeignKeys, completeForeignKeys, count, create, del, delete, delete, deleteTree, editTemplateUsage, evalCalculatedFields, evalCalculatedFields, evalNextRowId, evalObjectCalculatedFields, getAlert, getConsole, getCount, getCountGroupBy, getDirectURL, getFieldDefaultValue, getFileName, getFilePath, getFirstRowId, getInterface, getLastRowId, getNextRowId, getParentObject, getPreviousRowId, getQuery, getRefCalc, getRefCount, getSearchSpec, getStyle, getTool, getUserKeyList, hasFieldConstraints, hasTargetConstraints, init, initFromTable, initUpdateAll, insertTree, invokeAction, invokeAction, invokeAction, invokePrint, javascript, load, load, makeTree, merge, merge, populate, populate, populate, populateForeignKey, populateForeignKey, populateForeignKey, preLoad, prepareActionURL, redirect, resetParentContext, save, save, search, search, search, search, searchCrosstab, searchExport, searchExport, searchGroupBy, searchGroupBy, searchRowId, searchRowId, select, select, select, selectWithoutFilters, selectWithoutFilters, sendJavaScript, sendRedirect, setConsole, setConstraint, storeParentContext, storeParentContext, toCSV, toCSV, toTSV, toTSV, toXML, update, update, validate, validate, validateSearch
-
Methods inherited from class com.simplicite.util.ObjectCore
addAgenda, addCrosstab, addDataMap, addDefaultValues, addLinkDataMap, addListOperationField, addMenuListField, addMenuTrayField, addPlaceMap, addPredefinedSearch, addPrintTemplate, addReflexiveLink, addResource, addScript, addSharedScript, addTimesheet, buildInsertSQL, canClose, canCopy, canCreateOnLinks, canDeleteAll, canExport, canExportTimestamp, canFollowLink, canFollowLinks, canGroupByFields, canListAccessNewForm, canListAccessNewLine, canListAccessNewLoop, canPreview, canPrint, canSave, canSaveAndClose, canSaveAndCopy, canSaveAndNew, canSelectRow, canUpdateAll, clearMenuTrayFields, convertFilterToService, convertGuiToService, convertServiceToFilter, convertServiceToGui, destroy, enableGC, evalExpression, evalExpression, evalExpression, evalInputDisplayOldValue, evalInputDisplayValue, evalInputOldValue, evalInputValue, filtersToJson, freeListTree, garbageCollection, genAction, genCommonActions, getAction, getActions, getAgenda, getAgendas, getAlias, getBooleanParameter, getCacheFrom, getCacheKey, getCacheSelect, getClassName, getCode, getCodes, getConfig, getConfirmField, getConfirmFieldValue, getContext, getContextTitle, getCopyId, getCreatedBy, getCreatedDate, getCrosstab, getCrosstabs, getCtxHelps, getCurrentAction, getCurrentItem, getCurrentList, getCurrentPage, getCurrentPos, getCurrentRowId, getCurrentTransition, getCurrentView, getData, getDataMap, getDataSource, getDataSourceVendor, getDbField, getDBField, getDbIndex, getDBIndex, getDBName, getDefaultLink, getDefaultSearchSpec, getDesc, getDisplay, getDisplay, getDisplay, getDisplayFromDB, getDocFields, getDoubleParameter, getEndDateField, getField, getField, getField, getFieldArea, getFieldArea, getFieldAreas, getFieldAtIndex, getFieldByObjectFieldId, getFieldByTranslation, getFieldDisplayOldValue, getFieldDisplayOldValue, getFieldDisplayValue, getFieldDisplayValue, getFieldDisplayValue, getFieldFilter, getFieldFromColumn, getFieldFromColumn, getFieldIndex, getFieldIndex, getFieldOldValue, getFieldOldValue, getFieldOrder, getFields, getFields, getFieldsByType, getFieldsDocument, getFieldValue, getFieldValue, getFieldValue, getFieldValues, getFieldValues, getFilters, getFilters, getFlagParameter, getFloatParameter, getFonctId, getForeignKeys, getFormLayout, getFullInput, getFullInput, getFullInputIndex, getFullInputIndex, getFunctId, getGrant, getGroupByFields, getHistoricDBName, getHistoricName, getIconCode, getId, getImageField, getIndex, getIndex, getInheritedObjects, getInput, getInput, getInputAtIndex, getInputIndex, getInputIndex, getInstanceName, getIntParameter, getLabel, getLastUpdatedBy, getLastUpdatedDate, getLink, getLinkDataMap, getLinks, getListEditMode, getListOperationFields, getListSearchMode, getListSize, getListTree, getLock, getLongParameter, getMaxPage, getMaxRows, getMenuListFields, getMenuSearch, getMenuTrayFields, getMinRows, getModuleId, getModuleId, getModuleIdByName, getModuleName, getName, getObjectId, getObjectLocation, getObjectName, getObjectParameter, getObjectTable, getOldStatus, getOldValues, getOldValues, getPageSize, getParameter, getParameter, getParameters, getParentField, getParentIdx, getParentObjectRefField, getParentValues, getPlaceMap, getPlaceMaps, getPluralDisplay, getPluralLabel, getPredefinedSearch, getPredefinedSearchIndex, getPredefSearch, getPrintTemplate, getPrintTemplates, getRefField, getRefFields, getReflexiveLink, getReflexiveLinks, getRefObjects, getResource, getResources, getRootField, getRowId, getRowId, getRowIdField, getRowIdFieldIndex, getScript, getScriptId, getScripts, getSearchLimit, getSearchSpec, getSelectedIds, getSharedScript, getSharedScripts, getStartDateField, getStatus, getStatus, getStatusField, getStatusIndex, getTable, getTableAlias, getTemplateId, getTemplateName, getTimesheet, getTimesheets, getTitle, getTitle, getUIMiniature, getUITemplate, getUserKeyValues, getUserKeyValues, getValues, getValues, getView, getView, getViewMode, getViews, hasChanged, hasField, hasFieldType, hasFullInput, hasIndexableFields, hasInput, hasMenuDashboard, hasMenuStates, hasMenuTray, hasMoreOnForm, hasMoreOnList, hasMoreOnSearch, hasSearchLimitError, haveMore, initLists, initLists, isAgendaInstance, isAjaxInstance, isAreaVisible, isAreaVisibleOnList, isBatchInstance, isBookmark, isChildOf, isChildOf, isCopied, isCronInstance, isCustomRowId, isDataMapInstance, isDataMappedFrom, isDate, isDistinct, isExportInstance, isFieldForbidden, isFieldSearchable, isFieldUpdatable, isFieldVisible, isFieldVisibleJSON, isFiltered, isHistoricLog, isHistoricPost, isHistoricRedoLog, isHomeInstance, isIDEInstance, isIndexable, isInstanceOf, isInternalRowId, isJavaImplemented, isLimit, isListEditable, isListSearch, isListSearchVisible, isListTree, isListUpsertable, isLoaded, isMainInstance, isMergeable, isMergeInstance, isModelerInstance, isMoreForm, isMoreFormEnable, isMoreListEnable, isMoreOnForm, isMoreOnList, isMoreRows, isMoreSearch, isNew, isOrdered, isPanelInstance, isPanelOf, isPanelOf, isPredefSearch, isPredefSearchOnList, isPrintInstance, isProcessInstance, isQuerySpecific, isReadOnly, isReadOnlyFields, isRefCount, isReferencedFrom, isReferencedFrom, isRefInstance, isScripted, isServiceSpecific, isSocial, isSocialInline, isSocialPopup, isSocialShare, isSortableOnList, isTimestampBlocking, isTimestampNonBlocking, isTimestampOptimistic, isTmpInstance, isTreeviewInstance, isUIInstance, isUndoableInstance, isUnique, isUnique, isWebServiceInstance, lastUsage, listSelectAll, listSelectId, listSelectId, listSelectPage, listUnselectAll, listUnselectId, parseDataSourceName, parseTableName, prepareExpression, preparePagination, prepareSQL, removeField, removeLink, removeParameter, removeParameters, removeView, resetAllFields, resetAllFieldsRequired, resetAllFieldsSearch, resetAllFieldsSearchRequired, resetAllFieldsUpdatable, resetContextDefaultValues, resetFilter, resetFilters, resetFilters, resetFiltersOrdersAndCalcDefaults, resetGroupBy, resetOrders, resetOrders, resetRequireds, resetSearchables, resetSelectedIds, resetUpdatables, resetValues, resetValues, resetValues, resetVisibilities, selectCurrentItemFromList, selectItemFromList, setAlias, setAllFieldsUpdatable, setAreaVisibleOnList, setBookmark, setCacheFrom, setCacheSelect, setClassName, setClose, setConfig, setConfirmFieldValue, setContext, setCopy, setCopy, setCopyId, setCreateOnLinks, setCrosstabVisibility, setCtxHelp, setCtxHelps, setCurrentAction, setCurrentList, setCurrentPage, setCurrentPos, setCurrentPos, setCurrentTransition, setCurrentView, setData, setDataSource, setDataSourceVendor, setDBName, setDefaultLink, setDefaultSearchSpec, setDeleteAll, setDeleteAll, setDesc, setDisplay, setDistinct, setEndDateField, setExport, setExport, setExportTimestamp, setFieldFilter, setFieldOldValue, setFieldOrder, setFields, setFieldValue, setFilters, setFilters, setFilters, setFilters, setFilters, setFilters, setFollowLinks, setForm, setFormLayout, setFunctId, setGrant, setGroupByFields, setHaveMore, setHelp, setHistoric, setHistoricLog, setHistoricPost, setHistoricRedoLog, setIconCode, setId, setIndexable, setInheritedObject, setInstanceName, setLabel, setLimit, setListAccessNewForm, setListAccessNewLine, setListAccessNewLine, setListEdit, setListEdit, setListEditable, setListEditable, setListEditMode, setListSearch, setListSearchMode, setListSearchVisible, setListSize, setListTree, setListUpsertable, setMaxPage, setMaxRows, setMenuDashboard, setMenuSearch, setMenuStates, setMenuTray, setMergeable, setMergeable, setMinRows, setModuleId, setModuleName, setMoreForm, setMoreOnForm, setMoreOnList, setMoreRows, setMoreSearch, setName, setOldValues, setOldValues, setOldValues, setPageSize, setParameter, setParameter, setParameter, setParameter, setParameter, setParameter, setParentObject, setParentObjectRefField, setParentValues, setPluralDisplay, setPluralLabel, setPredefinedSearchIndex, setPredefSearch, setPredefSearch, setPredefSearch, setPredefSearchOnList, setPrint, setPrintTemplateVisibility, setQuerySpecific, setQuerySpecific, setReadOnly, setRefCount, setRowId, setSave, setSaveAndClose, setSaveAndCopy, setSaveAndNew, setScriptId, setSearchCreatedBy, setSearchCreatedDate, setSearchLimit, setSearchLimitError, setSearchSpec, setSearchSpec, setSearchUpdatedBy, setSearchUpdatedDate, setSelectedIds, setSelectRow, setServiceSpecific, setServiceSpecific, setSocial, setSocial, setSortableOnList, setStartDateField, setStatus, setStatus, setStatus, setStatusField, setTable, setTimestamp, setTitle, setUIMiniature, setUITemplate, setUpdateAll, setUpdateAll, setUserKeyValues, setUserKeyValues, setValues, setValues, setValues, setValues, setValues, setValues, setValues, setValues, setValuesFromJSONObject, setValuesFromJSONObject, setViewMode, testData, testData, toHTML, toHTML, toHTML, toJSON, toJSON, toJSON, toJSON, toJSON, toJSON, toJSON, toJSON, toJSONArray, toJSONObject, toJSONObject, toJSONObject, toString, toString, useForm, useLimit, useTimestamp, useTimeStamp
-
-
-
-
Method Detail
-
evalExpression
public java.lang.Object evalExpression(java.lang.String expr, int context, java.lang.String[] row, java.util.Map<java.lang.String,java.lang.Object> in, java.util.Map<java.lang.String,java.lang.Object> out) throws ScriptException
Description copied from class:ObjectCore
Prepare and evaluate an expression (see prepareExpression for details on tokens)- Overrides:
evalExpression
in classObjectCore
- Parameters:
expr
- Expressioncontext
- Contextrow
- Row (null means selected item)in
- Input variables to set before expression evaluationout
- Output variables to retrieve after expression evaluation- Returns:
- Expression evaluation result
- Throws:
ScriptException
-
checkExpression
public void checkExpression(java.lang.String expr) throws ScriptException
Description copied from class:ObjectCore
Prepares an expression and apply structural and elementary syntax checks, this method is only intended to this basic usage- Overrides:
checkExpression
in classObjectCore
- Parameters:
expr
- Expression- Throws:
ScriptException
-
postLoad
public void postLoad()
Description copied from class:ObjectDB
Hook called after loading the object definition
-
initCopy
public void initCopy()
Description copied from class:ObjectDB
Hook to init the copy
-
initCreate
public void initCreate()
Description copied from class:ObjectDB
Hook to init the creation- Overrides:
initCreate
in classObjectDB
-
initUpdate
public void initUpdate()
Description copied from class:ObjectDB
Hook to init the update- Overrides:
initUpdate
in classObjectDB
-
initDelete
public void initDelete()
Description copied from class:ObjectDB
Hook to init the Delete before delete dialog- Overrides:
initDelete
in classObjectDB
-
initList
public void initList(ObjectDB parent)
Description copied from class:ObjectDB
Hook to init the list
-
initRefSelect
public void initRefSelect(ObjectDB parent)
Description copied from class:ObjectDB
Hook to init the reference selection- Overrides:
initRefSelect
in classObjectDB
- Parameters:
parent
- Parent object (from which selection is made)
-
initAssociate
public void initAssociate(ObjectDB parent)
Description copied from class:ObjectDB
Hook to init the association- Overrides:
initAssociate
in classObjectDB
- Parameters:
parent
- Parent object (from which association is made)
-
initDataMapSelect
public void initDataMapSelect(java.lang.String dataMapName, ObjectDB parent)
Description copied from class:ObjectDB
Hook to init the data mapping selection- Overrides:
initDataMapSelect
in classObjectDB
- Parameters:
dataMapName
- Data mapping nameparent
- Parent object (from which selection is made)
-
initExport
public void initExport()
Description copied from class:ObjectDB
Hook to init the Export before export dialog- Overrides:
initExport
in classObjectDB
-
initCrosstab
public void initCrosstab(java.lang.String crosstabName)
Description copied from class:ObjectDB
Hook to init a pivot table- Overrides:
initCrosstab
in classObjectDB
- Parameters:
crosstabName
- Pivot table name
-
initPrintTemplate
public void initPrintTemplate(java.lang.String printTemplateName)
Description copied from class:ObjectDB
Hook to init a publication template- Overrides:
initPrintTemplate
in classObjectDB
- Parameters:
printTemplateName
- Publication template name
-
initAgenda
public void initAgenda(Agenda agenda)
Description copied from class:ObjectDB
Hook to init an agenda- Overrides:
initAgenda
in classObjectDB
- Parameters:
agenda
- Agenda
-
initPlaceMap
public void initPlaceMap(PlaceMap placemap)
Description copied from class:ObjectDB
Hook to init a place map- Overrides:
initPlaceMap
in classObjectDB
- Parameters:
placemap
- Place map
-
initSearch
public void initSearch()
Description copied from class:ObjectDB
Hook to init the search- Overrides:
initSearch
in classObjectDB
-
initAction
public void initAction(Action action)
Description copied from class:ObjectDB
Hook to init the Action fields before the confirm dialog.- By default field belonging to object are read only to confirm the value
- Other fields are updatable and sent to the callback method(Map) with pairs of name:value
- Overrides:
initAction
in classObjectDB
- Parameters:
action
- Action definition
-
preValidateSearch
public java.util.List<java.lang.String> preValidateSearch()
Description copied from class:ObjectDB
Hook called before search validation with the fields filters
It may be useful to check filters- Overrides:
preValidateSearch
in classObjectDB
-
postValidateSearch
public java.util.List<java.lang.String> postValidateSearch()
Description copied from class:ObjectDB
Hook called after search validation with the fields filters
It may be useful to check filters- Overrides:
postValidateSearch
in classObjectDB
-
preValidate
public java.util.List<java.lang.String> preValidate()
Description copied from class:ObjectDB
Hook called before system validation
It may be useful to force/calculate mandatory values- Overrides:
preValidate
in classObjectDB
- Returns:
- Error list, or empty/null when no business error
-
postValidate
public java.util.List<java.lang.String> postValidate()
Description copied from class:ObjectDB
Hook called after system validation
It may be useful to check specific rules before update- Overrides:
postValidate
in classObjectDB
- Returns:
- Error list, or empty/null when no business error
-
preStateTransition
public java.util.List<java.lang.String> preStateTransition(java.lang.String fromStatus, java.lang.String toStatus)
Description copied from class:ObjectDB
Hook called just before pre validate hook in case of a state transition
It may be useful to isolate specific state transition pre validation rules from other pre validation rules- Overrides:
preStateTransition
in classObjectDB
- Parameters:
fromStatus
- From statustoStatus
- To status- Returns:
- Error list, or empty/null when no business error
-
getCount
public long getCount(int maxRows)
Description copied from class:ObjectDB
Return the records count with the current search specification and filters
-
preCount
public void preCount()
Description copied from class:ObjectDB
Hook called before count with the fields filters (by default it calls the preSearch hook)
It may be useful to add some specific filters
-
preSearch
public void preSearch()
Description copied from class:ObjectDB
Hook called before search with the fields filters
It may be useful to add some specific filters
-
postSearchRow
public java.lang.String[] postSearchRow(java.lang.String[] row)
Description copied from class:ObjectDB
Hook called after search for each record
It may be useful to calculate fields or to change the record values- Overrides:
postSearchRow
in classObjectDB
- Parameters:
row
- The database record- Returns:
- The record values
-
postSearch
public java.util.List<java.lang.String[]> postSearch(java.util.List<java.lang.String[]> rows)
Description copied from class:ObjectDB
Hook called after search with the fields filters
It may be useful to calculate fields or to change the records- Overrides:
postSearch
in classObjectDB
- Parameters:
rows
- The database result- Returns:
- The search result
-
preCrosstabSearch
public void preCrosstabSearch(Crosstab ctb)
Description copied from class:ObjectDB
Hook called before pivot table search with the fields filters (by default it calls the preSearch hook)
It may be useful to add some specific filters- Overrides:
preCrosstabSearch
in classObjectDB
- Parameters:
ctb
- Pivot table
-
postCrosstabSearch
public java.util.List<java.lang.String[]> postCrosstabSearch(Crosstab ctb, java.util.List<java.lang.String[]> rows)
Description copied from class:ObjectDB
Hook called after pivot table search with the fields filters (by default it calls the postSearch hook)
It may be useful to calculate fields or to change the records- Overrides:
postCrosstabSearch
in classObjectDB
- Parameters:
ctb
- Pivot tablerows
- The database result- Returns:
- The search result for the GUI
-
preObjectSearch
public void preObjectSearch()
Description copied from class:ObjectDB
Hook called before search of object reference
It may be useful to add some specific filters- Overrides:
preObjectSearch
in classObjectDB
-
postObjectSearch
public java.util.List<java.lang.String[]> postObjectSearch(java.util.List<java.lang.String[]> rows)
Description copied from class:ObjectDB
Hook called after search of object reference
It may be useful to calculate fields or to change the records- Overrides:
postObjectSearch
in classObjectDB
- Parameters:
rows
- The database result- Returns:
- The search result
-
preSelect
public void preSelect(java.lang.String rowId, boolean copy)
Description copied from class:ObjectDB
Hook called before a single row selection
-
postSelect
public void postSelect(java.lang.String rowId, boolean copy)
Description copied from class:ObjectDB
Hook called after a single row selection- Overrides:
postSelect
in classObjectDB
- Parameters:
rowId
- The unique selected row IDcopy
- Indicate if it's a select for a future copy
-
preCreate
public java.lang.String preCreate()
Description copied from class:ObjectDB
Hook called before the database creation
-
postCreate
public java.lang.String postCreate()
Description copied from class:ObjectDB
Hook called after the database creation- Overrides:
postCreate
in classObjectDB
- Returns:
- Message code or null
-
preUpdate
public java.lang.String preUpdate()
Description copied from class:ObjectDB
Hook called before the database update
-
postUpdate
public java.lang.String postUpdate()
Description copied from class:ObjectDB
Hook called after the database update- Overrides:
postUpdate
in classObjectDB
- Returns:
- Message code or null
-
preSave
public java.lang.String preSave()
Description copied from class:ObjectDB
Hook called before the database save
-
postSave
public java.lang.String postSave()
Description copied from class:ObjectDB
Hook called after the database save
-
preDelete
public java.lang.String preDelete()
Description copied from class:ObjectDB
Hook called before the database deletion
-
postDelete
public java.lang.String postDelete()
Description copied from class:ObjectDB
Hook called after the database deletion- Overrides:
postDelete
in classObjectDB
- Returns:
- Message or a redirect statement or null
-
canUpdateAll
public boolean canUpdateAll(ObjectField f)
Description copied from class:ObjectDB
True if the field is bulk updatable, to override for specific behavior
By default, returns true if:
- the field (or its foreign key) is visible and updatable,
- not the single functional key in the object,
- for status field, if the selection is in a same status- Overrides:
canUpdateAll
in classObjectDB
-
preUpdateAll
@Deprecated(forRemoval=false, since="4.0") public java.lang.String preUpdateAll()
Deprecated.Use preUpdateAll with paramters- Overrides:
preUpdateAll
in classObjectDB
-
preUpdateAll
public java.lang.String preUpdateAll(Parameters params)
Description copied from class:ObjectDB
Hook called before bulk update- Overrides:
preUpdateAll
in classObjectDB
- Parameters:
params
- requested data- Returns:
- Error code or null
-
postUpdateAll
@Deprecated(forRemoval=false, since="4.0") public void postUpdateAll()
Deprecated.Use preUpdateAll with paramters- Overrides:
postUpdateAll
in classObjectDB
-
postUpdateAll
public void postUpdateAll(Parameters params)
Description copied from class:ObjectDB
Hook called after bulk update- Overrides:
postUpdateAll
in classObjectDB
- Parameters:
params
- requested data
-
preDeleteAll
public java.lang.String preDeleteAll()
Description copied from class:ObjectDB
Hook called before bulk delete- Overrides:
preDeleteAll
in classObjectDB
- Returns:
- Error code or null
-
postDeleteAll
public java.lang.String postDeleteAll()
Description copied from class:ObjectDB
Hook called after bulk delete- Overrides:
postDeleteAll
in classObjectDB
- Returns:
- Message or a redirect statement or null
-
initTimesheet
public void initTimesheet(Timesheet ts)
Description copied from class:ObjectDB
Hook to change timesheet before rendering- Overrides:
initTimesheet
in classObjectDB
- Parameters:
ts
- Timesheet
-
preSaveTimesheet
public java.util.List<java.lang.String> preSaveTimesheet(Timesheet ts)
Description copied from class:ObjectDB
Hook called before Timesheet save- Overrides:
preSaveTimesheet
in classObjectDB
- Parameters:
ts
- Timesheet- Returns:
- Message codes or null
-
postSaveTimesheet
public java.util.List<java.lang.String> postSaveTimesheet(Timesheet ts)
Description copied from class:ObjectDB
Hook called after Timesheet save- Overrides:
postSaveTimesheet
in classObjectDB
- Parameters:
ts
- Timesheet- Returns:
- Message codes or null
-
getPredefinedSearches
public java.util.List<PredefinedSearch> getPredefinedSearches()
Description copied from class:ObjectCore
Hook to get accessible predefined searches.- Overrides:
getPredefinedSearches
in classObjectCore
- Returns:
- the granted public and private searches on object
-
preSavePredefinedSearch
public java.lang.String preSavePredefinedSearch(PredefinedSearch ps)
Description copied from class:ObjectDB
Hook called before predefined-search save- Overrides:
preSavePredefinedSearch
in classObjectDB
- Parameters:
ps
- Predefined search- Returns:
- Error or null
-
postSavePredefinedSearch
public void postSavePredefinedSearch(PredefinedSearch ps)
Description copied from class:ObjectDB
Hook called after predefined-search save- Overrides:
postSavePredefinedSearch
in classObjectDB
- Parameters:
ps
- Predefined search
-
preExport
public void preExport()
Description copied from class:ObjectDB
Hook called before search in export of data
It may be useful to add some specific filters
-
postExport
public java.util.List<java.lang.String[]> postExport(java.util.List<java.lang.String[]> rows)
Description copied from class:ObjectDB
Hook called after search in export of data.
It may be useful to calculate fields or to change the records- Overrides:
postExport
in classObjectDB
- Parameters:
rows
- The database result- Returns:
- The search result
-
preImport
public java.lang.String preImport()
Description copied from class:ObjectDB
Hook called before processing object import
It may be useful to add data to imported data
(attention : imported data cannot be changed here)
or to execute business rules before actually processing the import
-
postImport
public java.lang.String postImport()
Description copied from class:ObjectDB
Hook called after processing object import
It may be useful to execute business rules after actually processing the import- Overrides:
postImport
in classObjectDB
- Returns:
- Error
-
isActionEnable
public boolean isActionEnable(java.lang.String[] row, java.lang.String action)
Description copied from class:ObjectDB
Hook to check if one action is available for a specific record
This method must be called to check if the action is available for the user- Overrides:
isActionEnable
in classObjectDB
- Parameters:
row
- Current recordaction
- Action name- Returns:
- True when the action is granted to the user (checks visibility if any)
-
isPrintTemplateEnable
public boolean isPrintTemplateEnable(java.lang.String[] row, java.lang.String printTemplate)
Description copied from class:ObjectDB
Hook to check if publication template is available for a specific record
This method must be called to check if the publication template is available for the user- Overrides:
isPrintTemplateEnable
in classObjectDB
printTemplate
- Publication template name- Returns:
- True when the publication template is granted to the user (check if publication template is enabled by default)
-
isMergeMaster
public boolean isMergeMaster()
Description copied from class:ObjectDB
Hook to tell is current record the merge master ?- Overrides:
isMergeMaster
in classObjectDB
- Returns:
- True if is merge master
-
isMergeEnable
public java.lang.String isMergeEnable(java.util.List<java.lang.String> ids)
Description copied from class:ObjectDB
Hook to tell if selected ids are mergeable- Overrides:
isMergeEnable
in classObjectDB
- Parameters:
ids
- List of row IDs- Returns:
- Error or null by default
-
isOpenEnable
public boolean isOpenEnable(java.lang.String[] row)
Description copied from class:ObjectDB
Hook to check if the open action is available for a specific record
This method must be called to check if the action is available for the user- Overrides:
isOpenEnable
in classObjectDB
- Parameters:
row
- Current record- Returns:
- True if open is granted to the user (by default read visibilities are checked, true is no visibility)
-
isCreateEnable
public boolean isCreateEnable()
Description copied from class:ObjectDB
Hook to check if the create action is available
This method must be called to check if the action is available for the user- Overrides:
isCreateEnable
in classObjectDB
- Returns:
- True if creation is granted to the user (not readonly, create constraints and visibilities are checked)
-
isCopyEnable
public boolean isCopyEnable(java.lang.String[] row)
Description copied from class:ObjectDB
Hook to check if the copy action is available for a specified record
This method must be called to check if the action is available for the user and the specified record- Overrides:
isCopyEnable
in classObjectDB
- Parameters:
row
- Current record- Returns:
- True if copy is granted to the user for the specified record (by default isCreateEnabled is called)
-
isUpdateEnable
public boolean isUpdateEnable(java.lang.String[] row)
Description copied from class:ObjectDB
Hook to check if the update action is available for a specified record
This method must be called to check if the action is available for the user and the specified record- Overrides:
isUpdateEnable
in classObjectDB
- Parameters:
row
- Current record- Returns:
- True if update is granted to the user for the specified record (not readonly, update constraints and visibilities are checked)
-
isStateTransitionEnable
public boolean isStateTransitionEnable(java.lang.String fromStatus, java.lang.String toStatus)
Description copied from class:ObjectDB
Hook called when building the list of possible state transition
It may be useful to implement specific state transition condition rules- Overrides:
isStateTransitionEnable
in classObjectDB
- Parameters:
fromStatus
- From statustoStatus
- To status- Returns:
- True when the state transition condition is fulfilled (true by default)
-
isDeleteEnable
public boolean isDeleteEnable(java.lang.String[] row)
Description copied from class:ObjectDB
Hook to check if the delete action is available for a specified record
This method must be called to check if the action is available for the user and the specified record- Overrides:
isDeleteEnable
in classObjectDB
- Parameters:
row
- Current record- Returns:
- True if deletion is granted to the user for the specified record (not readonly, delete constraints and visibilities are checked)
-
isCrosstabEnable
public boolean isCrosstabEnable(java.lang.String crosstab)
Description copied from class:ObjectDB
Hook to check if crosstab is available
This method must be called to check if the crosstab is available for the user- Overrides:
isCrosstabEnable
in classObjectDB
- Parameters:
crosstab
- Crosstab name- Returns:
- True when the crosstab is granted to the user (check if crosstab is enabled by default)
-
canFollowLink
public boolean canFollowLink(ObjectField field)
Description copied from class:ObjectCore
Allow follow a specific link ?- Overrides:
canFollowLink
in classObjectCore
- Parameters:
field
- Reference field (foreign key)- Returns:
- true by default, to override to limit some link access
-
canCreateOnLink
public boolean canCreateOnLink(ObjectField field)
Description copied from class:ObjectCore
Allow create on specific link ?- Overrides:
canCreateOnLink
in classObjectCore
- Parameters:
field
- Reference field- Returns:
- true by default, to override to limit some link creation
-
canReference
public boolean canReference(java.lang.String object, java.lang.String field)
Description copied from class:ObjectDB
Hook called to check if a referenced object can be displayed- Overrides:
canReference
in classObjectDB
- Parameters:
object
- Linked object name or view namefield
- Field name of foreign key (optional in case of object view)- Returns:
- True if the Link has been set to visible
-
isHistoric
public boolean isHistoric()
Description copied from class:ObjectCore
Is historization required?- Overrides:
isHistoric
in classObjectCore
- Returns:
- True if historization is required
-
printed
public java.lang.Object printed(PrintTemplate prt, java.lang.String rowId, java.lang.Object printed)
Description copied from class:ObjectDB
Callback hook when published. Useful to change the content or store the object before returning the publication result
-
getTargetObject
public java.lang.String[] getTargetObject(java.lang.String rowId, java.lang.String[] row)
Description copied from class:ObjectCore
Hook to substitute the current object/instance/rowId to another target object. Applied in case of row action (open, copy, print...). Useful in case of inheritance, redirection to another object or table.- Overrides:
getTargetObject
in classObjectCore
- Parameters:
rowId
- Target rowIdrow
- Optional, current row if known, otherwise the record have to be selected with the rowId- Returns:
- By default returns the current object itself. Return null if no target is possible. Otherwise an Array of 3 items: object name, instance name and row id.
-
invokeAction
public java.lang.String invokeAction(Action action, java.util.Map<java.lang.String,java.lang.String> params) throws ActionException
Description copied from class:ObjectDB
Action call with optional parameters- Overrides:
invokeAction
in classObjectDB
- Parameters:
action
- Actionparams
- Optional parameters- Returns:
- Action result
- Throws:
ActionException
-
invokePrint
public java.lang.Object invokePrint(PrintTemplate prt) throws PrintException
Description copied from class:ObjectDB
Publication method call. Warning: this only applies to a publication implemented as a method,
For a publication based on a template (file or text) you should use:prt.fillWithCurrentObject(this)
for single record (form) publicationprt.fillWithCurrentList(this)
for multiple record (list) publication
- Overrides:
invokePrint
in classObjectDB
- Parameters:
prt
- Publication template- Returns:
- Print result or null if publication template is not impemented as a method
- Throws:
PrintException
-
invokeCallback
public void invokeCallback(java.lang.String callbackName) throws MethodException
Description copied from class:ObjectDB
Simple callback method call- Overrides:
invokeCallback
in classObjectDB
- Parameters:
callbackName
- Callback name- Throws:
MethodException
-
invokeCallback
public void invokeCallback(java.lang.String callbackName, java.util.Map<java.lang.String,java.lang.String> params) throws MethodException
Description copied from class:ObjectDB
Simple callback method call- Overrides:
invokeCallback
in classObjectDB
- Parameters:
callbackName
- Callback nameparams
- Optional parameters field:value- Throws:
MethodException
-
invokeMethod
public java.lang.Object invokeMethod(java.lang.String methodName, java.lang.Class<?>[] paramTypes, java.lang.Object[] paramValues) throws MethodException
Description copied from class:ObjectDB
Method call with args- Overrides:
invokeMethod
in classObjectDB
- Parameters:
methodName
- Method nameparamTypes
- Table of class typesparamValues
- Table of values- Returns:
- Method result
- Throws:
MethodException
-
isUndoable
public boolean isUndoable(java.lang.String action)
Description copied from class:ObjectDB
Hook to allow undo/redo on the object- Overrides:
isUndoable
in classObjectDB
- Parameters:
action
- Optional action ObjectXML.ACTION_*- Returns:
- true by default for creation/deletion and update except status field (must use a valid transition)
-
preUndo
public boolean preUndo()
Description copied from class:ObjectDB
Hook called before undo
-
postUndo
public void postUndo()
Description copied from class:ObjectDB
Hook called after undo
-
preRedo
public boolean preRedo()
Description copied from class:ObjectDB
Hook called before redo
-
postRedo
public void postRedo()
Description copied from class:ObjectDB
Hook called after redo
-
getUserKeyLabel
public java.lang.String getUserKeyLabel(java.lang.String[] row)
Description copied from class:ObjectDB
Build a custom label to represent the user key of the record
If row is null, the selected fields are used. May be overridden to implement specific label- Overrides:
getUserKeyLabel
in classObjectDB
- Parameters:
row
- Any record, if row is null, the selected fields are used- Returns:
- The user key label based on object title or functional keys
-
getUserKeySearch
public java.lang.String getUserKeySearch(java.lang.String[] row)
Description copied from class:ObjectDB
Build a label to represent the searchable fields
If row is null, the selected fields are used. May be overrided to implement specific label- Overrides:
getUserKeySearch
in classObjectDB
- Parameters:
row
- Any record, if row is null, the selected fields are used- Returns:
- The object summary with search values
-
getExportFileName
public java.lang.String getExportFileName(java.lang.String media, java.lang.String name, java.lang.String[] row)
Description copied from class:ObjectDB
Export file name: default is the object label or user key, this hook can be overridden to change the output name.- Overrides:
getExportFileName
in classObjectDB
- Parameters:
media
- Export type: CSV, XLSX, PDF, ZIP, XML... HTTPTool.MEDIA_*name
- Default name: print template, crosstab name or object namerow
- Optional record in case of form export- Returns:
- File name (if no extension specified, it will be set automatically from the mime-type)
-
isExportAllowed
public java.lang.String isExportAllowed(java.lang.String mode, java.lang.String media, java.lang.String rowId)
Description copied from class:ObjectCore
Is requested export allowed?- Overrides:
isExportAllowed
in classObjectCore
- Parameters:
mode
- ObjectXML.MODE_* full | form | list | prefmedia
- ServletTool.MEDIA_*rowId
- Optional ID (form export)- Returns:
- Error to denied export, Warning to confirm on UI or null to allow export
-
getStyle
public java.lang.String getStyle(ObjectField f, java.lang.String[] row)
Description copied from class:ObjectDB
Gets specified field style from values array, by default call getStyle for the field value
May be override to change the style with specific business rules
-
getStyle
public java.lang.String getStyle(ObjectField f, double d)
Description copied from class:ObjectDB
Hook to specify field style for a crosstab value
-
getStyleTree
public java.lang.String getStyleTree(TreeView tv, java.lang.String[] row)
Description copied from class:ObjectDB
Hook to assign a style to a treeview item- Overrides:
getStyleTree
in classObjectDB
- Parameters:
tv
- Treeviewrow
- Values array- Returns:
- CSS class(es), null by default
-
getImage
public java.lang.String getImage(ObjectField f, java.lang.String val)
Description copied from class:ObjectDB
Get the field icon from single value. May be override to change the style with specific business rules
-
getImage
public java.lang.String getImage(ObjectField f, java.lang.String[] row)
Description copied from class:ObjectDB
Get the field icon from values array. May be override to change the style with specific business rules
-
getImageTree
public java.lang.String getImageTree(TreeView tv, java.lang.String[] row)
Description copied from class:ObjectDB
Hook to assign one icon to a treeview item- Overrides:
getImageTree
in classObjectDB
- Parameters:
tv
- Treeviewrow
- Values array- Returns:
- Icon name
-
getHelp
public java.lang.String getHelp()
Description copied from class:ObjectCore
Get main object help- Overrides:
getHelp
in classObjectCore
- Returns:
- Main object help
-
getCtxHelp
public java.lang.String getCtxHelp(java.lang.String helpContext)
Description copied from class:ObjectCore
Contextual help- Overrides:
getCtxHelp
in classObjectCore
- Parameters:
helpContext
- Help context (one of ObjectCtxHelp.CTXHELP_* constants)
-
preAlert
public java.lang.String preAlert(Alert a)
Description copied from class:ObjectDB
Hook before before sending the alert
-
customAlert
public java.lang.String customAlert(Alert a, java.lang.String subject, java.lang.String body, java.util.List<DocumentDB> attachments)
Description copied from class:ObjectDB
Hook for sending the alert using a custom media- Overrides:
customAlert
in classObjectDB
- Returns:
- Error code or null
-
postAlert
public java.lang.String postAlert(Alert a)
Description copied from class:ObjectDB
Hook before after sending the alert
-
getDeadlineDate
public java.util.Date getDeadlineDate(java.lang.String row_id, java.lang.String state, java.lang.String update_dt, int timeout)
Description copied from class:ObjectDB
Eval the timeout date of the object state (can be overrided with a specific rule)- Overrides:
getDeadlineDate
in classObjectDB
- Parameters:
row_id
- Row ID (to select the record if needed)state
- Current stateupdate_dt
- Last update date in service format yyyy-MM-dd HH:mm:sstimeout
- Default designed delay in seconds- Returns:
- A date = update_dt+timeout
-
getEmailRecipientType
public char getEmailRecipientType(java.lang.String alert, java.lang.String email, char type)
Description copied from class:ObjectDB
Hook to override the recipient type (TO/CC/BCC)- Overrides:
getEmailRecipientType
in classObjectDB
- Parameters:
alert
- Alert nameemail
- Emailtype
- Default designed type- Returns:
- Recipient type
-
getGroupEmailRecipientType
public char getGroupEmailRecipientType(java.lang.String alert, java.lang.String group, char type)
Description copied from class:ObjectDB
Hook to override the recipient type (TO/CC/BCC) of a group- Overrides:
getGroupEmailRecipientType
in classObjectDB
- Parameters:
alert
- Alert namegroup
- Group nametype
- Default designed type- Returns:
- Recipient type
-
spamEmail
public boolean spamEmail(java.lang.String alert, java.lang.String group, java.lang.String email)
Description copied from class:ObjectDB
Hook called to check if the email is a recipient of the alert
-
spamGroup
public boolean spamGroup(java.lang.String alert, java.lang.String group)
Description copied from class:ObjectDB
Hook called to check if the group is a recipient of the alert
-
fieldCompletion
public java.util.List<java.lang.String> fieldCompletion(java.lang.String field, java.lang.String query, java.lang.String context)
Description copied from class:ObjectDB
Hook to override the default field completion (Lucene or SQL search on field)
- Usefull to implement an editable select-box, to call a WebService and/or to populate a specific list of choice
- On client-side, use the field_completed(value) hook in the template to handle the selected value by user- Overrides:
fieldCompletion
in classObjectDB
- Parameters:
field
- Field to searchquery
- User query/filtercontext
- Field context = form, search or list- Returns:
- null to use the default behavior (lucene or sql), empty list to ignore completion, or a list with values to display
-
applyStaticConstraints
public void applyStaticConstraints()
Description copied from class:ObjectDB
Apply all static constraints on load- Overrides:
applyStaticConstraints
in classObjectDB
-
applyConstraints
public void applyConstraints(int context)
Description copied from class:ObjectDB
Apply all dynamic constraints- Overrides:
applyConstraints
in classObjectDB
- Parameters:
context
- Context
-
applyObjectConstraints
public void applyObjectConstraints(int context)
Description copied from class:ObjectDB
Apply all dynamic constraints on object- Overrides:
applyObjectConstraints
in classObjectDB
- Parameters:
context
- Context (one of ObjectCore.CONTEXT_*)
-
applyFieldConstraints
public void applyFieldConstraints(int context)
Description copied from class:ObjectDB
Apply all constraints on fields- Overrides:
applyFieldConstraints
in classObjectDB
- Parameters:
context
- Context
-
applyTargetConstraints
public void applyTargetConstraints(int context)
Description copied from class:ObjectDB
Apply all constraints on targets (action, link or view)- Overrides:
applyTargetConstraints
in classObjectDB
- Parameters:
context
- Context
-
checkObjectPropConstraints
public boolean checkObjectPropConstraints(int context, char objectProp)
Description copied from class:ObjectDB
Check object constraints for property- Overrides:
checkObjectPropConstraints
in classObjectDB
- Parameters:
context
- ContextobjectProp
- Property- Returns:
- Constraint status
-
getMappedExportPath
public java.lang.String getMappedExportPath(java.lang.String[] row)
Description copied from class:ObjectCore
Get the mapped export file path- Overrides:
getMappedExportPath
in classObjectCore
- Parameters:
row
- Row- Returns:
- Mapped export file path
-
getMappedFilePath
public java.lang.String getMappedFilePath(ObjectField f)
Description copied from class:ObjectCore
Get the mapped file path for specified field- Overrides:
getMappedFilePath
in classObjectCore
- Parameters:
f
- Document field- Returns:
- Document mapped file path or null
-
docuSign
public void docuSign(DocSignProvider.DocSignStatus doc)
Description copied from class:ObjectDB
DocuSign web-hook https://developers.docusign.com/esign-rest-api/code-examples/webhook-status
-
unitTests
public java.lang.String unitTests()
Description copied from class:ObjectDB
Unit tests
-
getSocialShareData
public SocialShareData getSocialShareData()
Description copied from class:ObjectDB
Hook to override share information to send to social medias. By default returns the user-key with a deep link to object (and the first image URL if any)- Overrides:
getSocialShareData
in classObjectDB
- Returns:
- Share data
-
getAgendaDay
@Deprecated(forRemoval=false, since="4.0") public java.lang.String getAgendaDay(Agenda a, java.util.Date d)
Deprecated.- Overrides:
getAgendaDay
in classObjectDB
-
getAgendaLabel
@Deprecated(forRemoval=false, since="4.0") public java.lang.String getAgendaLabel(Agenda a, ObjectField f)
Deprecated.- Overrides:
getAgendaLabel
in classObjectDB
-
getAgendaSelector
@Deprecated(forRemoval=false, since="4.0") public java.lang.String getAgendaSelector(Agenda a, java.lang.String selector)
Deprecated.- Overrides:
getAgendaSelector
in classObjectDB
-
getAgendaValue
@Deprecated(forRemoval=false, since="4.0") public java.lang.String getAgendaValue(Agenda a, ObjectField f, java.lang.String val)
Deprecated.- Overrides:
getAgendaValue
in classObjectDB
-
getAgendaWeek
@Deprecated(forRemoval=false, since="4.0") public java.lang.String getAgendaWeek(Agenda a, java.util.List<java.lang.String> days)
Deprecated.- Overrides:
getAgendaWeek
in classObjectDB
-
-