Started to split the actual model.

Signed-off-by: Kai Zimmermann <kai.zimmermann@bosch-si.com>
This commit is contained in:
Kai Zimmermann
2016-05-20 17:25:38 +02:00
parent 3e5330a5e6
commit e3041aa9ae
154 changed files with 6730 additions and 4950 deletions

View File

@@ -149,7 +149,7 @@ public class ArtifactStoreController {
actionStatus.addMessage(
ControllerManagement.SERVER_MESSAGE_PREFIX + "Target downloads: " + request.getRequestURI());
}
controllerManagement.addInformationalActionStatus(actionStatus);
controllerManagement.addActionStatusMessage(actionStatus);
return action;
}

View File

@@ -150,7 +150,7 @@ public class RootController {
return new ResponseEntity<>(
DataConversionHelper.fromTarget(target, controllerManagement.findActionByTargetAndActive(target),
controllerManagement.getPollingTime(), tenantAware),
controllerManagement.findPollingTime(), tenantAware),
HttpStatus.OK);
}
@@ -222,7 +222,7 @@ public class RootController {
statusMessage.addMessage(
ControllerManagement.SERVER_MESSAGE_PREFIX + "Target downloads " + request.getRequestURI());
}
controllerManagement.addInformationalActionStatus(statusMessage);
controllerManagement.addActionStatusMessage(statusMessage);
return action;
}
@@ -371,7 +371,8 @@ public class RootController {
return new ResponseEntity<>(HttpStatus.GONE);
}
controllerManagement.addUpdateActionStatus(generateUpdateStatus(feedback, targetid, feedback.getId(), action));
controllerManagement.addUpdateActionStatus(generateUpdateStatus(feedback, targetid, feedback.getId(), action),
action);
return new ResponseEntity<>(HttpStatus.OK);
@@ -545,7 +546,7 @@ public class RootController {
}
controllerManagement
.addCancelActionStatus(generateActionCancelStatus(feedback, target, feedback.getId(), action));
.addCancelActionStatus(generateActionCancelStatus(feedback, target, feedback.getId(), action), action);
return new ResponseEntity<>(HttpStatus.OK);
}

View File

@@ -22,8 +22,8 @@ import org.eclipse.hawkbit.repository.SoftwareManagement;
import org.eclipse.hawkbit.repository.SystemManagement;
import org.eclipse.hawkbit.repository.TargetFields;
import org.eclipse.hawkbit.repository.TargetManagement;
import org.eclipse.hawkbit.repository.TargetWithActionType;
import org.eclipse.hawkbit.repository.exception.EntityNotFoundException;
import org.eclipse.hawkbit.repository.jpa.TargetWithActionType;
import org.eclipse.hawkbit.repository.model.DistributionSet;
import org.eclipse.hawkbit.repository.model.DistributionSetMetadata;
import org.eclipse.hawkbit.repository.model.DsMetadataCompositeKey;

View File

@@ -69,7 +69,7 @@ public class DistributionSetTypeResource implements DistributionSetTypeRestApi {
final Slice<DistributionSetType> findModuleTypessAll;
Long countModulesAll;
if (rsqlParam != null) {
findModuleTypessAll = distributionSetManagement.findDistributionSetTypesAll(
findModuleTypessAll = distributionSetManagement.findDistributionSetTypesByPredicate(
RSQLUtility.parse(rsqlParam, DistributionSetTypeFields.class), pageable);
countModulesAll = ((Page<DistributionSetType>) findModuleTypessAll).getTotalElements();
} else {

View File

@@ -178,7 +178,7 @@ public class RolloutResource implements RolloutRestApi {
final Page<RolloutGroup> findRolloutGroupsAll;
if (rsqlParam != null) {
findRolloutGroupsAll = this.rolloutGroupManagement.findRolloutGroupsAll(rollout,
findRolloutGroupsAll = this.rolloutGroupManagement.findRolloutGroupsByPredicate(rollout,
RSQLUtility.parse(rsqlParam, RolloutGroupFields.class), pageable);
} else {
findRolloutGroupsAll = this.rolloutGroupManagement.findRolloutGroupsByRolloutId(rolloutId, pageable);

View File

@@ -30,12 +30,12 @@ import org.eclipse.hawkbit.AbstractIntegrationTest;
import org.eclipse.hawkbit.MockMvcResultPrinter;
import org.eclipse.hawkbit.TestDataUtil;
import org.eclipse.hawkbit.WithUser;
import org.eclipse.hawkbit.repository.ActionRepository;
import org.eclipse.hawkbit.repository.ControllerManagement;
import org.eclipse.hawkbit.repository.DistributionSetManagement;
import org.eclipse.hawkbit.repository.SoftwareManagement;
import org.eclipse.hawkbit.repository.TargetManagement;
import org.eclipse.hawkbit.repository.exception.EntityNotFoundException;
import org.eclipse.hawkbit.repository.jpa.ActionRepository;
import org.eclipse.hawkbit.repository.model.Action;
import org.eclipse.hawkbit.repository.model.Action.Status;
import org.eclipse.hawkbit.repository.model.ActionStatus;
@@ -890,7 +890,7 @@ public class DistributionSetResourceTest extends AbstractIntegrationTest {
for (final String msg : msgs) {
statusMessages.addMessage(msg);
}
controllerManagament.addUpdateActionStatus(statusMessages);
controllerManagament.addUpdateActionStatus(statusMessages, updActA);
return targetManagement.findTargetByControllerID(t.getControllerId());
}

View File

@@ -108,7 +108,8 @@ public class TargetResourceTest extends AbstractIntegrationTest {
final List<Action> actions = generateTargetWithTwoUpdatesWithOneOverride(knownTargetId);
actions.get(0).setStatus(Status.FINISHED);
controllerManagament.addUpdateActionStatus(
new ActionStatus(actions.get(0), Status.FINISHED, System.currentTimeMillis(), "testmessage"));
new ActionStatus(actions.get(0), Status.FINISHED, System.currentTimeMillis(), "testmessage"),
actions.get(0));
final PageRequest pageRequest = new PageRequest(0, 1000, Direction.ASC, ActionFields.ID.getFieldName());
final ActionStatus status = deploymentManagement
@@ -1283,8 +1284,8 @@ public class TargetResourceTest extends AbstractIntegrationTest {
final Pageable pageReq = new PageRequest(0, 100);
final Action action = actionRepository.findByDistributionSet(pageReq, savedSet).getContent().get(0);
final ActionStatus actionStatus = new ActionStatus(action, Status.FINISHED, 0L);
controllerManagement.addUpdateActionStatus(actionStatus);
final ActionStatus actionStatus = new ActionStatus(action, Status.FINISHED, 0l);
controllerManagement.addUpdateActionStatus(actionStatus, action);
}
/**