Remove FieldValueConverter (#2699)
* (because) used only for ActionFields.STATUS * could be part of new Node mapping mechanism * simplify * Deprecate ActionFields.STATUS, add / replace it with ActionFields.ACTIVE. In future STATUS will become the real action status (and DETAILSTATUS will be removed) * Deprecate MgmtAction.getStatus add / replace it with MgmtAction.isActive. In future status will become the real action status (and detailStatus will be removed) Signed-off-by: Avgustin Marinov <Avgustin.Marinov@bosch.com>
This commit is contained in:
@@ -239,12 +239,9 @@ public final class MgmtTargetMapper {
|
||||
action.getWeight().ifPresent(result::setWeight);
|
||||
result.setForceType(MgmtRestModelMapper.convertActionType(action.getActionType()));
|
||||
|
||||
if (action.isActive()) {
|
||||
result.setStatus(MgmtAction.ACTION_PENDING);
|
||||
} else {
|
||||
result.setStatus(MgmtAction.ACTION_FINISHED);
|
||||
}
|
||||
result.setStatus(action.isActive() ? MgmtAction.ACTION_PENDING : MgmtAction.ACTION_FINISHED);
|
||||
|
||||
result.setActive(action.isActive());
|
||||
result.setDetailStatus(action.getStatus().toString().toLowerCase());
|
||||
|
||||
action.getLastActionStatusCode().ifPresent(result::setLastStatusCode);
|
||||
|
||||
Reference in New Issue
Block a user