public class DefaultModelHelper extends java.lang.Object implements ModelHelper
| Modifier and Type | Class and Description |
|---|---|
class |
DefaultModelHelper.ModificationInfo |
| Constructor and Description |
|---|
DefaultModelHelper() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkUserRights(ItemModel model,
DefaultModelHelper.ModificationInfo modificationInfo) |
protected void |
checkUserRights(ItemModel model,
java.lang.String attribute,
boolean creationMode) |
protected void |
createUndoOperation(ItemModel model,
DefaultModelHelper.ModificationInfo modificationInfo) |
protected void |
createUndoOperations(java.util.Set<DefaultModelHelper.ModificationInfo> modificationInfos) |
protected CommonI18NService |
getCommonI18NService() |
protected I18NService |
getI18nService() |
protected LocalizationService |
getLocalizationService()
Deprecated.
since 6.3
|
protected ModelService |
getModelService() |
protected DefaultModelHelper.ModificationInfo |
getModificationInfo(ItemModel model) |
protected java.lang.Object |
getOriginalValue(ItemModel model,
java.lang.String attribute,
java.util.Locale locale,
ModelValueHistory history) |
protected java.lang.Object |
getOriginalValue(ItemModel model,
java.lang.String attribute,
ModelValueHistory history) |
protected SystemService |
getSystemService() |
protected TypeService |
getTypeService() |
protected UIAccessRightService |
getUiAccessRightService() |
protected UndoManager |
getUndoManager() |
boolean |
isWritable(ItemModel model,
java.lang.String attribute,
boolean creationMode)
Checks write permissions for the given item and attribute.
|
protected void |
logModifications(ItemModel model,
DefaultModelHelper.ModificationInfo modificationInfo) |
void |
removeModel(ItemModel model,
boolean createUndoOperation)
Removes the given model and creates a change log entry.
|
void |
removeModel(ItemModel model,
boolean createUndoOperation,
boolean sendChangeEvents)
Removes the given model and creates a change log entry.
|
void |
saveModel(ItemModel model,
boolean createUndoOperations)
Saves the given model and creates a change log entry.
|
void |
saveModel(ItemModel model,
boolean createUndoOperations,
boolean sendChangeEvents)
Saves the given model and creates a change log entry.
|
void |
saveModels(java.util.Set<ItemModel> models,
boolean createUndoOperations)
Saves given models and creates change log entry for each modification.
|
void |
saveModels(java.util.Set<ItemModel> models,
boolean createUndoOperations,
boolean sendChangeEvents)
Saves given models and creates change log entry for each modification.
|
protected void |
sendItemChangeEvent(ItemModel model,
DefaultModelHelper.ModificationInfo modificationInfo) |
void |
setCommonI18NService(CommonI18NService commonI18NService) |
void |
setI18nService(I18NService i18nService) |
void |
setLocalizationService(LocalizationService localizationService)
Deprecated.
since 6.3
|
void |
setModelService(ModelService modelService) |
void |
setSystemService(SystemService systemService) |
void |
setTypeService(TypeService typeService) |
void |
setUiAccessRightService(UIAccessRightService uiAccessRightService) |
void |
setUndoManager(UndoManager undoManager) |
protected boolean |
valuesEqual(java.lang.Object value1,
java.lang.Object value2,
boolean localized) |
public void saveModel(ItemModel model, boolean createUndoOperations) throws ValueHandlerException
ModelHelpersaveModel in interface ModelHelpermodel - the model to savecreateUndoOperations - undo operation will be created if set to trueValueHandlerException - when problem occurs, e.g. user rights check failspublic void saveModel(ItemModel model, boolean createUndoOperations, boolean sendChangeEvents) throws ValueHandlerException
ModelHelpersaveModel in interface ModelHelpermodel - the model to savecreateUndoOperations - undo operation will be created if set to trueValueHandlerException - when problem occurs, e.g. user rights check failspublic void saveModels(java.util.Set<ItemModel> models, boolean createUndoOperations) throws ValueHandlerException
ModelHelpersaveModels in interface ModelHelpermodels - models to savecreateUndoOperations - undo operation will be created if set to trueValueHandlerException - when problem occurs, e.g. user rights check failspublic void saveModels(java.util.Set<ItemModel> models, boolean createUndoOperations, boolean sendChangeEvents) throws ValueHandlerException
ModelHelpersaveModels in interface ModelHelpermodels - models to savecreateUndoOperations - undo operation will be created if set to truesendChangeEvents - if true, item change events will be sentValueHandlerException - when problem occurs, e.g. user rights check failsprotected void sendItemChangeEvent(ItemModel model, DefaultModelHelper.ModificationInfo modificationInfo)
protected void checkUserRights(ItemModel model, DefaultModelHelper.ModificationInfo modificationInfo) throws ValueHandlerException
ValueHandlerExceptionprotected void checkUserRights(ItemModel model, java.lang.String attribute, boolean creationMode) throws ValueHandlerException
ValueHandlerExceptionprotected DefaultModelHelper.ModificationInfo getModificationInfo(ItemModel model)
protected java.lang.Object getOriginalValue(ItemModel model, java.lang.String attribute, ModelValueHistory history)
protected java.lang.Object getOriginalValue(ItemModel model, java.lang.String attribute, java.util.Locale locale, ModelValueHistory history)
protected void logModifications(ItemModel model, DefaultModelHelper.ModificationInfo modificationInfo)
protected void createUndoOperations(java.util.Set<DefaultModelHelper.ModificationInfo> modificationInfos)
protected void createUndoOperation(ItemModel model, DefaultModelHelper.ModificationInfo modificationInfo)
public void removeModel(ItemModel model, boolean createUndoOperation) throws ValueHandlerException
ModelHelperremoveModel in interface ModelHelpermodel - the model to removecreateUndoOperation - undo operation will be created if set to trueValueHandlerException - when problem occurs, e.g. user rights check failspublic void removeModel(ItemModel model, boolean createUndoOperation, boolean sendChangeEvents) throws ValueHandlerException
ModelHelperremoveModel in interface ModelHelpermodel - the model to removecreateUndoOperation - undo operation will be created if set to truesendChangeEvents - if true, item change events will be sentValueHandlerException - when problem occurs, e.g. user rights check failspublic boolean isWritable(ItemModel model, java.lang.String attribute, boolean creationMode)
ModelHelperisWritable in interface ModelHelpermodel - the item to check permission forattribute - the attribute to check permission forcreationMode - creation modeprotected boolean valuesEqual(java.lang.Object value1,
java.lang.Object value2,
boolean localized)
public void setModelService(ModelService modelService)
protected ModelService getModelService()
public void setTypeService(TypeService typeService)
protected TypeService getTypeService()
public void setSystemService(SystemService systemService)
protected SystemService getSystemService()
public void setUiAccessRightService(UIAccessRightService uiAccessRightService)
protected UIAccessRightService getUiAccessRightService()
public void setI18nService(I18NService i18nService)
protected I18NService getI18nService()
public void setCommonI18NService(CommonI18NService commonI18NService)
protected CommonI18NService getCommonI18NService()
@Deprecated public void setLocalizationService(LocalizationService localizationService)
@Deprecated protected LocalizationService getLocalizationService()
public void setUndoManager(UndoManager undoManager)
protected UndoManager getUndoManager()
Copyright © 2018 SAP SE. All Rights Reserved.