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 entityDto, Collection<FieldDto> fields)

addFilterableFields

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

addLookups

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

commitChanges

public void commitChanges(Long entityId, String changesOwner)

commitChanges

public void commitChanges(Long entityId)

createEntity

public EntityDto createEntity(EntityDto entityDto)

deleteEntity

public void deleteEntity(Long entityId)

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)

getEntitiesWithLookups

public List<EntityDto> getEntitiesWithLookups()

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)

getEntityFields

public List<FieldDto> getEntityFields(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)

listEntities

public List<EntityDto> listEntities()

listEntities

public List<EntityDto> listEntities(boolean withSecurityCheck)

listWorkInProgress

public List<EntityDto> listWorkInProgress()

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)

setMDSConstructor

public void setMDSConstructor(MDSConstructor mdsConstructor)

updateComboboxValues

public void updateComboboxValues(Long entityId, Map<String, Collection> fieldValuesToUpdate)

updateDraft

public EntityDto updateDraft(Long entityId)