EntityServiceImpl

public class EntityServiceImpl implements EntityService

Default implementation of org.motechproject.mds.service.EntityService interface.

Methods

abandonChanges

public void abandonChanges(Long entityId)

addDisplayedFields

public void addDisplayedFields(EntityDto entityDto, Map<String, Long> positions)

addFields

public void addFields(EntityDto entity, Collection<FieldDto> fields)

addFields

public void addFields(Long entityId, FieldDto... fields)

addFields

public void addFields(EntityDto entity, FieldDto... fields)

addFields

public void addFields(Long entityId, Collection<FieldDto> fields)

addFilterableFields

public void addFilterableFields(EntityDto entityDto, Collection<String> fieldNames)

addLookups

public void addLookups(EntityDto entityDto, LookupDto... lookups)

addLookups

public void addLookups(EntityDto entityDto, Collection<LookupDto> lookups)

addLookups

public void addLookups(Long entityId, LookupDto... lookups)

addLookups

public void addLookups(Long entityId, Collection<LookupDto> lookups)

addNonEditableFields

public void addNonEditableFields(EntityDto entityDto, Map<String, Boolean> nonEditableFields)

commitChanges

public List<String> commitChanges(Long entityId, String changesOwner)

commitChanges

public List<String> commitChanges(Long entityId)

createEntity

public EntityDto createEntity(EntityDto entityDto)

deleteEntity

public void deleteEntity(Long entityId)

findEntitiesByPackage

public List<EntityDto> findEntitiesByPackage(String packageName)

findEntityFieldByName

public FieldDto findEntityFieldByName(Long entityId, String name)

findFieldByName

public FieldDto findFieldByName(Long entityId, String name)

getAdvancedSettings

public AdvancedSettingsDto getAdvancedSettings(Long entityId)

getAdvancedSettings

public AdvancedSettingsDto getAdvancedSettings(Long entityId, boolean committed)

getCurrentSchemaVersion

public Long getCurrentSchemaVersion(String className)

getDisplayFields

public List<FieldDto> getDisplayFields(Long entityId)

getEntity

public EntityDto getEntity(Long entityId)

getEntityByClassName

public EntityDto getEntityByClassName(String className)

getEntityDraft

public EntityDraft getEntityDraft(Long entityId)

getEntityDraft

public EntityDraft getEntityDraft(Long entityId, String username)

getEntityFieldById

public FieldDto getEntityFieldById(Long entityId, Long fieldId)

getEntityFields

public List<FieldDto> getEntityFields(Long entityId)

getEntityFieldsByClassName

public List<FieldDto> getEntityFieldsByClassName(String className)

getEntityFieldsByClassNameForUI

public List<FieldDto> getEntityFieldsByClassNameForUI(String className)

getEntityFieldsForUI

public List<FieldDto> getEntityFieldsForUI(Long entityId)

getEntityForEdit

public EntityDto getEntityForEdit(Long entityId)

getEntityLookups

public List<LookupDto> getEntityLookups(Long entityId)

getFields

public List<FieldDto> getFields(Long entityId)

getLookupByName

public LookupDto getLookupByName(Long entityId, String lookupName)

getLookupFieldsMapping

public Map<String, FieldDto> getLookupFieldsMapping(Long entityId, String lookupName)

getSchema

public SchemaHolder getSchema()

incrementVersion

public void incrementVersion(Long entityId)

listEntities

public List<EntityDto> listEntities()

listEntities

public List<EntityDto> listEntities(boolean withSecurityCheck)

listEntitiesByBundle

public List<EntityDto> listEntitiesByBundle(String bundleSymbolicName)

listWorkInProgress

public List<EntityDto> listWorkInProgress()

safeGetAdvancedSettingsCommitted

public AdvancedSettingsDto safeGetAdvancedSettingsCommitted(String entityClassName)

saveDraftEntityChanges

public DraftResult saveDraftEntityChanges(Long entityId, DraftData draftData, String username)

saveDraftEntityChanges

public DraftResult saveDraftEntityChanges(Long entityId, DraftData draftData)

setAllEntities

public void setAllEntities(AllEntities allEntities)

setAllEntityAudits

public void setAllEntityAudits(AllEntityAudits allEntityAudits)

setAllEntityDrafts

public void setAllEntityDrafts(AllEntityDrafts allEntityDrafts)

setAllTypes

public void setAllTypes(AllTypes allTypes)

setAllUserPreferences

public void setAllUserPreferences(AllUserPreferences allUserPreferences)

setBundleContext

public void setBundleContext(BundleContext bundleContext)

setComboboxDataMigrationHelper

public void setComboboxDataMigrationHelper(ComboboxDataMigrationHelper comboboxDataMigrationHelper)

setEntityValidator

public void setEntityValidator(EntityValidator entityValidator)

setMDSConstructor

public void setMDSConstructor(MDSConstructor mdsConstructor)

setUserPreferencesService

public void setUserPreferencesService(UserPreferencesService userPreferencesService)

updateDraft

public EntityDto updateDraft(Long entityId)

updateMaxFetchDepth

public void updateMaxFetchDepth(Long entityId, Integer maxFetchDepth)

updateRestOptions

public void updateRestOptions(Long entityId, RestOptionsDto restOptionsDto)

updateSecurityOptions

public void updateSecurityOptions(Long entityId, SecurityMode securityMode, Set<String> securityMembers, SecurityMode readOnlySecurityMode, Set<String> readOnlySecurityMembers)

updateTracking

public void updateTracking(Long entityId, TrackingDto trackingDto)