[Major] Refactored services to use generic Arguments were applicable
This commit is contained in:
parent
c89a275452
commit
b7b9d63e79
|
@ -0,0 +1,86 @@
|
|||
/*
|
||||
* Copyright 2013 Robert von Burg <eitch@eitchnet.ch>
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package li.strolch.command;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.List;
|
||||
|
||||
import li.strolch.agent.api.ActivityMap;
|
||||
import li.strolch.agent.api.ComponentContainer;
|
||||
import li.strolch.exception.StrolchException;
|
||||
import li.strolch.model.activity.Activity;
|
||||
import li.strolch.persistence.api.StrolchTransaction;
|
||||
import li.strolch.service.api.Command;
|
||||
import li.strolch.utils.dbc.DBC;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
*/
|
||||
public class RemoveActivityCollectionCommand extends Command {
|
||||
|
||||
private List<Activity> activities;
|
||||
|
||||
/**
|
||||
* @param tx
|
||||
*/
|
||||
public RemoveActivityCollectionCommand(ComponentContainer container, StrolchTransaction tx) {
|
||||
super(container, tx);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param activities
|
||||
* the activities to set
|
||||
*/
|
||||
public void setActivities(List<Activity> activities) {
|
||||
this.activities = activities;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void validate() {
|
||||
DBC.PRE.assertNotNull("Activity list may not be null!", this.activities);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doCommand() {
|
||||
|
||||
for (Activity activity : this.activities) {
|
||||
tx().lock(activity);
|
||||
}
|
||||
|
||||
ActivityMap activityMap = tx().getActivityMap();
|
||||
for (Activity activity : this.activities) {
|
||||
if (!activityMap.hasElement(tx(), activity.getType(), activity.getId())) {
|
||||
String msg = "The Activity {0} can not be removed as it does not exist!";
|
||||
msg = MessageFormat.format(msg, activity.getLocator());
|
||||
throw new StrolchException(msg);
|
||||
}
|
||||
}
|
||||
|
||||
activityMap.removeAll(tx(), this.activities);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void undo() {
|
||||
if (this.activities != null && !this.activities.isEmpty() && tx().isRollingBack()) {
|
||||
ActivityMap activityMap = tx().getActivityMap();
|
||||
for (Activity activity : this.activities) {
|
||||
if (!activityMap.hasElement(tx(), activity.getType(), activity.getId())) {
|
||||
activityMap.add(tx(), activity);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -21,6 +21,7 @@ import li.strolch.persistence.api.StrolchTransaction;
|
|||
import li.strolch.service.api.AbstractService;
|
||||
import li.strolch.service.api.ServiceArgument;
|
||||
import li.strolch.service.api.ServiceResult;
|
||||
import li.strolch.service.api.ServiceResultState;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
|
@ -31,7 +32,7 @@ public class AddActivityService extends AbstractService<AddActivityService.AddAc
|
|||
|
||||
@Override
|
||||
protected ServiceResult getResultInstance() {
|
||||
return new ServiceResult();
|
||||
return new ServiceResult(ServiceResultState.FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -21,6 +21,7 @@ import li.strolch.persistence.api.StrolchTransaction;
|
|||
import li.strolch.service.api.AbstractService;
|
||||
import li.strolch.service.api.ServiceArgument;
|
||||
import li.strolch.service.api.ServiceResult;
|
||||
import li.strolch.service.api.ServiceResultState;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
|
@ -31,7 +32,7 @@ public class AddOrderService extends AbstractService<AddOrderService.AddOrderArg
|
|||
|
||||
@Override
|
||||
protected ServiceResult getResultInstance() {
|
||||
return new ServiceResult();
|
||||
return new ServiceResult(ServiceResultState.FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -21,6 +21,7 @@ import li.strolch.persistence.api.StrolchTransaction;
|
|||
import li.strolch.service.api.AbstractService;
|
||||
import li.strolch.service.api.ServiceArgument;
|
||||
import li.strolch.service.api.ServiceResult;
|
||||
import li.strolch.service.api.ServiceResultState;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
|
@ -31,7 +32,7 @@ public class AddResourceService extends AbstractService<AddResourceService.AddRe
|
|||
|
||||
@Override
|
||||
protected ServiceResult getResultInstance() {
|
||||
return new ServiceResult();
|
||||
return new ServiceResult(ServiceResultState.FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -22,6 +22,7 @@ import li.strolch.model.ModelStatistics;
|
|||
import li.strolch.persistence.api.StrolchTransaction;
|
||||
import li.strolch.service.api.AbstractService;
|
||||
import li.strolch.service.api.ServiceResult;
|
||||
import li.strolch.service.api.ServiceResultState;
|
||||
import li.strolch.utils.helper.StringHelper;
|
||||
|
||||
/**
|
||||
|
@ -33,7 +34,7 @@ public class ClearModelService extends AbstractService<ClearModelArgument, Servi
|
|||
|
||||
@Override
|
||||
protected ServiceResult getResultInstance() {
|
||||
return new ServiceResult();
|
||||
return new ServiceResult(ServiceResultState.FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
package li.strolch.service;
|
||||
|
||||
import li.strolch.model.Locator;
|
||||
import li.strolch.service.api.ServiceArgument;
|
||||
|
||||
public class LocatorArgument extends ServiceArgument {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public Locator locator;
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package li.strolch.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import li.strolch.model.Locator;
|
||||
import li.strolch.service.api.ServiceArgument;
|
||||
|
||||
public class LocatorListArgument extends ServiceArgument {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public List<Locator> locators;
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
/*
|
||||
* Copyright 2013 Robert von Burg <eitch@eitchnet.ch>
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package li.strolch.service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import li.strolch.command.RemoveActivityCollectionCommand;
|
||||
import li.strolch.model.Locator;
|
||||
import li.strolch.model.activity.Activity;
|
||||
import li.strolch.persistence.api.StrolchTransaction;
|
||||
import li.strolch.service.api.AbstractService;
|
||||
import li.strolch.service.api.ServiceResult;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
*/
|
||||
public class RemoveActivityCollectionService extends AbstractService<LocatorListArgument, ServiceResult> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
protected ServiceResult getResultInstance() {
|
||||
return new ServiceResult();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ServiceResult internalDoService(LocatorListArgument arg) {
|
||||
|
||||
try (StrolchTransaction tx = openTx(arg.realm)) {
|
||||
|
||||
List<Activity> activities = new ArrayList<>(arg.locators.size());
|
||||
for (Locator locator : arg.locators) {
|
||||
Activity resource = tx.findElement(locator);
|
||||
activities.add(resource);
|
||||
}
|
||||
|
||||
RemoveActivityCollectionCommand command = new RemoveActivityCollectionCommand(getContainer(), tx);
|
||||
command.setActivities(activities);
|
||||
|
||||
tx.addCommand(command);
|
||||
tx.commitOnClose();
|
||||
}
|
||||
|
||||
return ServiceResult.success();
|
||||
}
|
||||
}
|
|
@ -16,27 +16,26 @@
|
|||
package li.strolch.service;
|
||||
|
||||
import li.strolch.command.RemoveActivityCommand;
|
||||
import li.strolch.model.Locator;
|
||||
import li.strolch.model.activity.Activity;
|
||||
import li.strolch.persistence.api.StrolchTransaction;
|
||||
import li.strolch.service.api.AbstractService;
|
||||
import li.strolch.service.api.ServiceArgument;
|
||||
import li.strolch.service.api.ServiceResult;
|
||||
import li.strolch.service.api.ServiceResultState;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
*/
|
||||
public class RemoveActivityService extends AbstractService<RemoveActivityService.RemoveActivityArg, ServiceResult> {
|
||||
public class RemoveActivityService extends AbstractService<LocatorArgument, ServiceResult> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
protected ServiceResult getResultInstance() {
|
||||
return new ServiceResult();
|
||||
return new ServiceResult(ServiceResultState.FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ServiceResult internalDoService(RemoveActivityArg arg) {
|
||||
protected ServiceResult internalDoService(LocatorArgument arg) {
|
||||
|
||||
try (StrolchTransaction tx = openTx(arg.realm)) {
|
||||
|
||||
|
@ -51,9 +50,4 @@ public class RemoveActivityService extends AbstractService<RemoveActivityService
|
|||
|
||||
return ServiceResult.success();
|
||||
}
|
||||
|
||||
public static class RemoveActivityArg extends ServiceArgument {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public Locator locator;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,14 +23,12 @@ import li.strolch.model.Locator;
|
|||
import li.strolch.model.Order;
|
||||
import li.strolch.persistence.api.StrolchTransaction;
|
||||
import li.strolch.service.api.AbstractService;
|
||||
import li.strolch.service.api.ServiceArgument;
|
||||
import li.strolch.service.api.ServiceResult;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
*/
|
||||
public class RemoveOrderCollectionService extends
|
||||
AbstractService<RemoveOrderCollectionService.RemoveOrderCollectionArg, ServiceResult> {
|
||||
public class RemoveOrderCollectionService extends AbstractService<LocatorListArgument, ServiceResult> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
@ -40,7 +38,7 @@ public class RemoveOrderCollectionService extends
|
|||
}
|
||||
|
||||
@Override
|
||||
protected ServiceResult internalDoService(RemoveOrderCollectionArg arg) {
|
||||
protected ServiceResult internalDoService(LocatorListArgument arg) {
|
||||
|
||||
try (StrolchTransaction tx = openTx(arg.realm)) {
|
||||
|
||||
|
@ -59,9 +57,4 @@ public class RemoveOrderCollectionService extends
|
|||
|
||||
return ServiceResult.success();
|
||||
}
|
||||
|
||||
public static class RemoveOrderCollectionArg extends ServiceArgument {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public List<Locator> locators;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,27 +16,26 @@
|
|||
package li.strolch.service;
|
||||
|
||||
import li.strolch.command.RemoveOrderCommand;
|
||||
import li.strolch.model.Locator;
|
||||
import li.strolch.model.Order;
|
||||
import li.strolch.persistence.api.StrolchTransaction;
|
||||
import li.strolch.service.api.AbstractService;
|
||||
import li.strolch.service.api.ServiceArgument;
|
||||
import li.strolch.service.api.ServiceResult;
|
||||
import li.strolch.service.api.ServiceResultState;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
*/
|
||||
public class RemoveOrderService extends AbstractService<RemoveOrderService.RemoveOrderArg, ServiceResult> {
|
||||
public class RemoveOrderService extends AbstractService<LocatorArgument, ServiceResult> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
protected ServiceResult getResultInstance() {
|
||||
return new ServiceResult();
|
||||
return new ServiceResult(ServiceResultState.FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ServiceResult internalDoService(RemoveOrderArg arg) {
|
||||
protected ServiceResult internalDoService(LocatorArgument arg) {
|
||||
|
||||
try (StrolchTransaction tx = openTx(arg.realm)) {
|
||||
|
||||
|
@ -51,9 +50,4 @@ public class RemoveOrderService extends AbstractService<RemoveOrderService.Remov
|
|||
|
||||
return ServiceResult.success();
|
||||
}
|
||||
|
||||
public static class RemoveOrderArg extends ServiceArgument {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public Locator locator;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,14 +23,12 @@ import li.strolch.model.Locator;
|
|||
import li.strolch.model.Resource;
|
||||
import li.strolch.persistence.api.StrolchTransaction;
|
||||
import li.strolch.service.api.AbstractService;
|
||||
import li.strolch.service.api.ServiceArgument;
|
||||
import li.strolch.service.api.ServiceResult;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
*/
|
||||
public class RemoveResourceCollectionService extends
|
||||
AbstractService<RemoveResourceCollectionService.RemoveResourceCollectionArg, ServiceResult> {
|
||||
public class RemoveResourceCollectionService extends AbstractService<LocatorListArgument, ServiceResult> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
@ -40,7 +38,7 @@ public class RemoveResourceCollectionService extends
|
|||
}
|
||||
|
||||
@Override
|
||||
protected ServiceResult internalDoService(RemoveResourceCollectionArg arg) {
|
||||
protected ServiceResult internalDoService(LocatorListArgument arg) {
|
||||
|
||||
try (StrolchTransaction tx = openTx(arg.realm)) {
|
||||
|
||||
|
@ -59,9 +57,4 @@ public class RemoveResourceCollectionService extends
|
|||
|
||||
return ServiceResult.success();
|
||||
}
|
||||
|
||||
public static class RemoveResourceCollectionArg extends ServiceArgument {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public List<Locator> locators;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,27 +16,26 @@
|
|||
package li.strolch.service;
|
||||
|
||||
import li.strolch.command.RemoveResourceCommand;
|
||||
import li.strolch.model.Locator;
|
||||
import li.strolch.model.Resource;
|
||||
import li.strolch.persistence.api.StrolchTransaction;
|
||||
import li.strolch.service.api.AbstractService;
|
||||
import li.strolch.service.api.ServiceArgument;
|
||||
import li.strolch.service.api.ServiceResult;
|
||||
import li.strolch.service.api.ServiceResultState;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
*/
|
||||
public class RemoveResourceService extends AbstractService<RemoveResourceService.RemoveResourceArg, ServiceResult> {
|
||||
public class RemoveResourceService extends AbstractService<LocatorArgument, ServiceResult> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
protected ServiceResult getResultInstance() {
|
||||
return new ServiceResult();
|
||||
return new ServiceResult(ServiceResultState.FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ServiceResult internalDoService(RemoveResourceArg arg) {
|
||||
protected ServiceResult internalDoService(LocatorArgument arg) {
|
||||
|
||||
try (StrolchTransaction tx = openTx(arg.realm)) {
|
||||
|
||||
|
@ -51,9 +50,4 @@ public class RemoveResourceService extends AbstractService<RemoveResourceService
|
|||
|
||||
return ServiceResult.success();
|
||||
}
|
||||
|
||||
public static class RemoveResourceArg extends ServiceArgument {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public Locator locator;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
package li.strolch.service;
|
||||
|
||||
import li.strolch.model.StrolchElement;
|
||||
import li.strolch.service.api.ServiceArgument;
|
||||
|
||||
public class StrolchElementArgument extends ServiceArgument {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public StrolchElement element;
|
||||
}
|
|
@ -21,6 +21,7 @@ import li.strolch.persistence.api.StrolchTransaction;
|
|||
import li.strolch.service.api.AbstractService;
|
||||
import li.strolch.service.api.ServiceArgument;
|
||||
import li.strolch.service.api.ServiceResult;
|
||||
import li.strolch.service.api.ServiceResultState;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
|
@ -31,7 +32,7 @@ public class UpdateActivityService extends AbstractService<UpdateActivityService
|
|||
|
||||
@Override
|
||||
protected ServiceResult getResultInstance() {
|
||||
return new ServiceResult();
|
||||
return new ServiceResult(ServiceResultState.FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -21,6 +21,7 @@ import li.strolch.persistence.api.StrolchTransaction;
|
|||
import li.strolch.service.api.AbstractService;
|
||||
import li.strolch.service.api.ServiceArgument;
|
||||
import li.strolch.service.api.ServiceResult;
|
||||
import li.strolch.service.api.ServiceResultState;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
|
@ -31,7 +32,7 @@ public class UpdateOrderService extends AbstractService<UpdateOrderService.Updat
|
|||
|
||||
@Override
|
||||
protected ServiceResult getResultInstance() {
|
||||
return new ServiceResult();
|
||||
return new ServiceResult(ServiceResultState.FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -21,6 +21,7 @@ import li.strolch.persistence.api.StrolchTransaction;
|
|||
import li.strolch.service.api.AbstractService;
|
||||
import li.strolch.service.api.ServiceArgument;
|
||||
import li.strolch.service.api.ServiceResult;
|
||||
import li.strolch.service.api.ServiceResultState;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
|
@ -31,7 +32,7 @@ public class UpdateResourceService extends AbstractService<UpdateResourceService
|
|||
|
||||
@Override
|
||||
protected ServiceResult getResultInstance() {
|
||||
return new ServiceResult();
|
||||
return new ServiceResult(ServiceResultState.FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -23,6 +23,7 @@ import li.strolch.model.ModelStatistics;
|
|||
import li.strolch.persistence.api.StrolchTransaction;
|
||||
import li.strolch.service.api.AbstractService;
|
||||
import li.strolch.service.api.ServiceResult;
|
||||
import li.strolch.service.api.ServiceResultState;
|
||||
import li.strolch.utils.dbc.DBC;
|
||||
|
||||
/**
|
||||
|
@ -34,7 +35,7 @@ public class XmlExportModelService extends AbstractService<XmlExportModelArgumen
|
|||
|
||||
@Override
|
||||
protected ServiceResult getResultInstance() {
|
||||
return new ServiceResult();
|
||||
return new ServiceResult(ServiceResultState.FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -35,7 +35,7 @@ public class XmlImportModelService extends AbstractService<XmlImportModelArgumen
|
|||
|
||||
@Override
|
||||
protected XmlImportModelResult getResultInstance() {
|
||||
return new XmlImportModelResult();
|
||||
return new XmlImportModelResult(ServiceResultState.FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -23,6 +23,7 @@ import li.strolch.persistence.api.StrolchTransaction;
|
|||
import li.strolch.service.api.AbstractService;
|
||||
import li.strolch.service.api.ServiceArgument;
|
||||
import li.strolch.service.api.ServiceResult;
|
||||
import li.strolch.service.api.ServiceResultState;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
|
@ -33,7 +34,7 @@ public class AddParameterService extends AbstractService<AddParameterService.Add
|
|||
|
||||
@Override
|
||||
protected ServiceResult getResultInstance() {
|
||||
return new ServiceResult();
|
||||
return new ServiceResult(ServiceResultState.FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -16,27 +16,27 @@
|
|||
package li.strolch.service.parameter;
|
||||
|
||||
import li.strolch.command.parameter.RemoveParameterCommand;
|
||||
import li.strolch.model.Locator;
|
||||
import li.strolch.model.parameter.Parameter;
|
||||
import li.strolch.persistence.api.StrolchTransaction;
|
||||
import li.strolch.service.LocatorArgument;
|
||||
import li.strolch.service.api.AbstractService;
|
||||
import li.strolch.service.api.ServiceArgument;
|
||||
import li.strolch.service.api.ServiceResult;
|
||||
import li.strolch.service.api.ServiceResultState;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
*/
|
||||
public class RemoveParameterService extends AbstractService<RemoveParameterService.RemoveParameterArg, ServiceResult> {
|
||||
public class RemoveParameterService extends AbstractService<LocatorArgument, ServiceResult> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
protected ServiceResult getResultInstance() {
|
||||
return new ServiceResult();
|
||||
return new ServiceResult(ServiceResultState.FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ServiceResult internalDoService(RemoveParameterArg arg) {
|
||||
protected ServiceResult internalDoService(LocatorArgument arg) {
|
||||
|
||||
try (StrolchTransaction tx = openTx(arg.realm)) {
|
||||
|
||||
|
@ -52,9 +52,4 @@ public class RemoveParameterService extends AbstractService<RemoveParameterServi
|
|||
|
||||
return ServiceResult.success();
|
||||
}
|
||||
|
||||
public static class RemoveParameterArg extends ServiceArgument {
|
||||
private static final long serialVersionUID = 1L;
|
||||
public Locator locator;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ import li.strolch.persistence.api.StrolchTransaction;
|
|||
import li.strolch.service.api.AbstractService;
|
||||
import li.strolch.service.api.ServiceArgument;
|
||||
import li.strolch.service.api.ServiceResult;
|
||||
import li.strolch.service.api.ServiceResultState;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
|
@ -32,7 +33,7 @@ public class SetParameterService extends AbstractService<SetParameterService.Set
|
|||
|
||||
@Override
|
||||
protected ServiceResult getResultInstance() {
|
||||
return new ServiceResult();
|
||||
return new ServiceResult(ServiceResultState.FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -22,6 +22,7 @@ import li.strolch.privilege.handler.PrivilegeHandler;
|
|||
import li.strolch.privilege.model.RoleRep;
|
||||
import li.strolch.runtime.StrolchConstants.StrolchPrivilegeConstants;
|
||||
import li.strolch.service.api.AbstractService;
|
||||
import li.strolch.service.api.ServiceResultState;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
|
@ -33,7 +34,7 @@ public class PrivilegeAddOrReplacePrivilegeOnRoleService
|
|||
|
||||
@Override
|
||||
protected PrivilegeRoleResult getResultInstance() {
|
||||
return new PrivilegeRoleResult();
|
||||
return new PrivilegeRoleResult(ServiceResultState.FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -22,6 +22,7 @@ import li.strolch.privilege.handler.PrivilegeHandler;
|
|||
import li.strolch.privilege.model.RoleRep;
|
||||
import li.strolch.runtime.StrolchConstants.StrolchPrivilegeConstants;
|
||||
import li.strolch.service.api.AbstractService;
|
||||
import li.strolch.service.api.ServiceResultState;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
|
@ -33,7 +34,7 @@ public class PrivilegeRemovePrivilegeFromRoleService
|
|||
|
||||
@Override
|
||||
protected PrivilegeRoleResult getResultInstance() {
|
||||
return new PrivilegeRoleResult();
|
||||
return new PrivilegeRoleResult(ServiceResultState.FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -22,6 +22,7 @@ import li.strolch.privilege.handler.PrivilegeHandler;
|
|||
import li.strolch.privilege.model.RoleRep;
|
||||
import li.strolch.runtime.StrolchConstants.StrolchPrivilegeConstants;
|
||||
import li.strolch.service.api.AbstractService;
|
||||
import li.strolch.service.api.ServiceResultState;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
|
@ -32,7 +33,7 @@ public class PrivilegeRemoveRoleService extends AbstractService<PrivilegeRoleNam
|
|||
|
||||
@Override
|
||||
protected PrivilegeRoleResult getResultInstance() {
|
||||
return new PrivilegeRoleResult();
|
||||
return new PrivilegeRoleResult(ServiceResultState.FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -22,6 +22,7 @@ import li.strolch.privilege.handler.PrivilegeHandler;
|
|||
import li.strolch.privilege.model.RoleRep;
|
||||
import li.strolch.runtime.StrolchConstants.StrolchPrivilegeConstants;
|
||||
import li.strolch.service.api.AbstractService;
|
||||
import li.strolch.service.api.ServiceResultState;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
|
@ -32,7 +33,7 @@ public class PrivilegeUpdateRoleService extends AbstractService<PrivilegeRoleArg
|
|||
|
||||
@Override
|
||||
protected PrivilegeRoleResult getResultInstance() {
|
||||
return new PrivilegeRoleResult();
|
||||
return new PrivilegeRoleResult(ServiceResultState.FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -22,6 +22,7 @@ import li.strolch.privilege.handler.PrivilegeHandler;
|
|||
import li.strolch.privilege.model.UserRep;
|
||||
import li.strolch.runtime.StrolchConstants.StrolchPrivilegeConstants;
|
||||
import li.strolch.service.api.AbstractService;
|
||||
import li.strolch.service.api.ServiceResultState;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
|
@ -33,7 +34,7 @@ public class PrivilegeAddRoleToUserService
|
|||
|
||||
@Override
|
||||
protected PrivilegeUserResult getResultInstance() {
|
||||
return new PrivilegeUserResult();
|
||||
return new PrivilegeUserResult(ServiceResultState.FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -22,6 +22,7 @@ import li.strolch.privilege.handler.PrivilegeHandler;
|
|||
import li.strolch.privilege.model.UserRep;
|
||||
import li.strolch.runtime.StrolchConstants.StrolchPrivilegeConstants;
|
||||
import li.strolch.service.api.AbstractService;
|
||||
import li.strolch.service.api.ServiceResultState;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
|
@ -32,7 +33,7 @@ public class PrivilegeAddUserService extends AbstractService<PrivilegeUserArgume
|
|||
|
||||
@Override
|
||||
protected PrivilegeUserResult getResultInstance() {
|
||||
return new PrivilegeUserResult();
|
||||
return new PrivilegeUserResult(ServiceResultState.FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -22,6 +22,7 @@ import li.strolch.privilege.handler.PrivilegeHandler;
|
|||
import li.strolch.privilege.model.UserRep;
|
||||
import li.strolch.runtime.StrolchConstants.StrolchPrivilegeConstants;
|
||||
import li.strolch.service.api.AbstractService;
|
||||
import li.strolch.service.api.ServiceResultState;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
|
@ -32,7 +33,7 @@ public class PrivilegeRemoveUserService extends AbstractService<PrivilegeUserNam
|
|||
|
||||
@Override
|
||||
protected PrivilegeUserResult getResultInstance() {
|
||||
return new PrivilegeUserResult();
|
||||
return new PrivilegeUserResult(ServiceResultState.FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -22,6 +22,7 @@ import li.strolch.privilege.handler.PrivilegeHandler;
|
|||
import li.strolch.privilege.model.UserRep;
|
||||
import li.strolch.runtime.StrolchConstants.StrolchPrivilegeConstants;
|
||||
import li.strolch.service.api.AbstractService;
|
||||
import li.strolch.service.api.ServiceResultState;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
|
@ -33,7 +34,7 @@ public class PrivilegeSetUserLocaleService
|
|||
|
||||
@Override
|
||||
protected PrivilegeUserResult getResultInstance() {
|
||||
return new PrivilegeUserResult();
|
||||
return new PrivilegeUserResult(ServiceResultState.FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -22,6 +22,7 @@ import li.strolch.privilege.handler.PrivilegeHandler;
|
|||
import li.strolch.runtime.StrolchConstants.StrolchPrivilegeConstants;
|
||||
import li.strolch.service.api.AbstractService;
|
||||
import li.strolch.service.api.ServiceResult;
|
||||
import li.strolch.service.api.ServiceResultState;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
|
@ -32,7 +33,7 @@ public class PrivilegeSetUserPasswordService extends AbstractService<PrivilegeSe
|
|||
|
||||
@Override
|
||||
protected ServiceResult getResultInstance() {
|
||||
return new ServiceResult();
|
||||
return new ServiceResult(ServiceResultState.FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -22,6 +22,7 @@ import li.strolch.privilege.handler.PrivilegeHandler;
|
|||
import li.strolch.privilege.model.UserRep;
|
||||
import li.strolch.runtime.StrolchConstants.StrolchPrivilegeConstants;
|
||||
import li.strolch.service.api.AbstractService;
|
||||
import li.strolch.service.api.ServiceResultState;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
|
@ -32,7 +33,7 @@ public class PrivilegeSetUserStateService extends AbstractService<PrivilegeSetUs
|
|||
|
||||
@Override
|
||||
protected PrivilegeUserResult getResultInstance() {
|
||||
return new PrivilegeUserResult();
|
||||
return new PrivilegeUserResult(ServiceResultState.FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -22,6 +22,7 @@ import li.strolch.privilege.handler.PrivilegeHandler;
|
|||
import li.strolch.privilege.model.UserRep;
|
||||
import li.strolch.runtime.StrolchConstants.StrolchPrivilegeConstants;
|
||||
import li.strolch.service.api.AbstractService;
|
||||
import li.strolch.service.api.ServiceResultState;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
|
@ -32,7 +33,7 @@ public class PrivilegeUpdateUserService extends AbstractService<PrivilegeUserArg
|
|||
|
||||
@Override
|
||||
protected PrivilegeUserResult getResultInstance() {
|
||||
return new PrivilegeUserResult();
|
||||
return new PrivilegeUserResult(ServiceResultState.FAILED);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -0,0 +1,74 @@
|
|||
/*
|
||||
* Copyright 2013 Robert von Burg <eitch@eitchnet.ch>
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package li.strolch.command;
|
||||
|
||||
import static org.junit.Assert.assertFalse;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.junit.Before;
|
||||
|
||||
import li.strolch.agent.api.ComponentContainer;
|
||||
import li.strolch.model.Locator;
|
||||
import li.strolch.model.Tags;
|
||||
import li.strolch.model.activity.Activity;
|
||||
import li.strolch.persistence.api.StrolchTransaction;
|
||||
import li.strolch.service.api.Command;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
*/
|
||||
public class RemoveActivityCollectionCommandTest extends AbstractRealmCommandTest {
|
||||
|
||||
private List<Locator> locators;
|
||||
|
||||
@Before
|
||||
public void before() {
|
||||
this.locators = new ArrayList<>();
|
||||
this.locators.add(Locator.newBuilder(Tags.ACTIVITY, "ActivityType", "activity_1").build());
|
||||
this.locators.add(Locator.newBuilder(Tags.ACTIVITY, "ActivityType", "activity_2").build());
|
||||
this.locators.add(Locator.newBuilder(Tags.ACTIVITY, "ActivityType", "activity_3").build());
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Command getCommandInstance(ComponentContainer container, StrolchTransaction tx) {
|
||||
|
||||
List<Activity> activities = new ArrayList<>(this.locators.size());
|
||||
for (Locator locator : this.locators) {
|
||||
activities.add((Activity) tx.findElement(locator));
|
||||
}
|
||||
|
||||
RemoveActivityCollectionCommand command = new RemoveActivityCollectionCommand(container, tx);
|
||||
command.setActivities(activities);
|
||||
return command;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void validateAfterCommand(ComponentContainer container, StrolchTransaction tx) {
|
||||
for (Locator locator : locators) {
|
||||
assertFalse(tx.getActivityMap().hasElement(tx, locator.get(1), locator.get(2)));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void validateAfterCommandFailed(ComponentContainer container, StrolchTransaction tx) {
|
||||
for (Locator locator : locators) {
|
||||
assertTrue(tx.getActivityMap().hasElement(tx, locator.get(1), locator.get(2)));
|
||||
}
|
||||
}
|
||||
}
|
|
@ -30,6 +30,8 @@ import org.junit.Assert;
|
|||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import li.strolch.command.planning.AssignActionCommand;
|
||||
import li.strolch.command.planning.PlanActionCommand;
|
||||
import li.strolch.model.Locator;
|
||||
import li.strolch.model.ModelGenerator;
|
||||
import li.strolch.model.ParameterBag;
|
||||
|
|
|
@ -30,6 +30,7 @@ import org.junit.Assert;
|
|||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import li.strolch.command.planning.PlanActionCommand;
|
||||
import li.strolch.model.Locator;
|
||||
import li.strolch.model.ModelGenerator;
|
||||
import li.strolch.model.ParameterBag;
|
||||
|
|
|
@ -32,6 +32,7 @@ import org.junit.Assert;
|
|||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import li.strolch.command.planning.PlanActivityCommand;
|
||||
import li.strolch.model.Locator;
|
||||
import li.strolch.model.ModelGenerator;
|
||||
import li.strolch.model.ParameterBag;
|
||||
|
|
|
@ -31,6 +31,8 @@ import org.junit.Assert;
|
|||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import li.strolch.command.planning.PlanActionCommand;
|
||||
import li.strolch.command.planning.ShiftActionCommand;
|
||||
import li.strolch.model.Locator;
|
||||
import li.strolch.model.ModelGenerator;
|
||||
import li.strolch.model.ParameterBag;
|
||||
|
|
|
@ -19,7 +19,6 @@ import org.junit.Test;
|
|||
|
||||
import li.strolch.model.Locator;
|
||||
import li.strolch.model.Tags;
|
||||
import li.strolch.service.RemoveActivityService.RemoveActivityArg;
|
||||
import li.strolch.service.test.AbstractRealmServiceTest;
|
||||
|
||||
/**
|
||||
|
@ -30,7 +29,7 @@ public class RemoveActivityServiceTest extends AbstractRealmServiceTest {
|
|||
@Test
|
||||
public void runTest() {
|
||||
|
||||
RemoveActivityArg arg = new RemoveActivityArg();
|
||||
LocatorArgument arg = new LocatorArgument();
|
||||
arg.locator = Locator.newBuilder(Tags.ACTIVITY, "ActivityType", "activity_1").build();
|
||||
|
||||
runServiceInAllRealmTypes(RemoveActivityService.class, arg);
|
||||
|
|
|
@ -17,13 +17,12 @@ package li.strolch.service;
|
|||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import li.strolch.model.Locator;
|
||||
import li.strolch.model.Tags;
|
||||
import li.strolch.service.RemoveOrderCollectionService.RemoveOrderCollectionArg;
|
||||
import li.strolch.service.test.AbstractRealmServiceTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
*/
|
||||
|
@ -32,7 +31,7 @@ public class RemoveOrderCollectionServiceTest extends AbstractRealmServiceTest {
|
|||
@Test
|
||||
public void runTest() {
|
||||
|
||||
RemoveOrderCollectionArg arg = new RemoveOrderCollectionArg();
|
||||
LocatorListArgument arg = new LocatorListArgument();
|
||||
|
||||
ArrayList<Locator> locators = new ArrayList<>();
|
||||
locators.add(Locator.newBuilder(Tags.ORDER, "TestType", "@1").build());
|
||||
|
|
|
@ -15,13 +15,12 @@
|
|||
*/
|
||||
package li.strolch.service;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import li.strolch.model.Locator;
|
||||
import li.strolch.model.Tags;
|
||||
import li.strolch.service.RemoveOrderService.RemoveOrderArg;
|
||||
import li.strolch.service.test.AbstractRealmServiceTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
*/
|
||||
|
@ -30,7 +29,7 @@ public class RemoveOrderServiceTest extends AbstractRealmServiceTest {
|
|||
@Test
|
||||
public void runTest() {
|
||||
|
||||
RemoveOrderArg arg = new RemoveOrderArg();
|
||||
LocatorArgument arg = new LocatorArgument();
|
||||
arg.locator = Locator.newBuilder(Tags.ORDER, "TestType", "@3").build();
|
||||
|
||||
runServiceInAllRealmTypes(RemoveOrderService.class, arg);
|
||||
|
|
|
@ -17,13 +17,12 @@ package li.strolch.service;
|
|||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import li.strolch.model.Locator;
|
||||
import li.strolch.model.Tags;
|
||||
import li.strolch.service.RemoveResourceCollectionService.RemoveResourceCollectionArg;
|
||||
import li.strolch.service.test.AbstractRealmServiceTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
*/
|
||||
|
@ -32,7 +31,7 @@ public class RemoveResourceCollectionServiceTest extends AbstractRealmServiceTes
|
|||
@Test
|
||||
public void runTest() {
|
||||
|
||||
RemoveResourceCollectionArg arg = new RemoveResourceCollectionArg();
|
||||
LocatorListArgument arg = new LocatorListArgument();
|
||||
|
||||
ArrayList<Locator> locators = new ArrayList<>();
|
||||
locators.add(Locator.newBuilder(Tags.RESOURCE, "Enumeration", "salutations").build());
|
||||
|
|
|
@ -15,13 +15,12 @@
|
|||
*/
|
||||
package li.strolch.service;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import li.strolch.model.Locator;
|
||||
import li.strolch.model.Tags;
|
||||
import li.strolch.service.RemoveResourceService.RemoveResourceArg;
|
||||
import li.strolch.service.test.AbstractRealmServiceTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
*/
|
||||
|
@ -30,7 +29,7 @@ public class RemoveResourceServiceTest extends AbstractRealmServiceTest {
|
|||
@Test
|
||||
public void runTest() {
|
||||
|
||||
RemoveResourceArg arg = new RemoveResourceArg();
|
||||
LocatorArgument arg = new LocatorArgument();
|
||||
arg.locator = Locator.newBuilder(Tags.RESOURCE, "Enumeration", "sex").build();
|
||||
|
||||
runServiceInAllRealmTypes(RemoveResourceService.class, arg);
|
||||
|
|
|
@ -15,13 +15,13 @@
|
|||
*/
|
||||
package li.strolch.service.test.parameter;
|
||||
|
||||
import li.strolch.model.Locator;
|
||||
import li.strolch.service.parameter.RemoveParameterService;
|
||||
import li.strolch.service.parameter.RemoveParameterService.RemoveParameterArg;
|
||||
import li.strolch.service.test.AbstractRealmServiceTest;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import li.strolch.model.Locator;
|
||||
import li.strolch.service.LocatorArgument;
|
||||
import li.strolch.service.parameter.RemoveParameterService;
|
||||
import li.strolch.service.test.AbstractRealmServiceTest;
|
||||
|
||||
/**
|
||||
* @author Robert von Burg <eitch@eitchnet.ch>
|
||||
*/
|
||||
|
@ -30,7 +30,7 @@ public class RemoveParameterServiceTest extends AbstractRealmServiceTest {
|
|||
@Test
|
||||
public void runTest() {
|
||||
|
||||
RemoveParameterArg arg = new RemoveParameterArg();
|
||||
LocatorArgument arg = new LocatorArgument();
|
||||
arg.locator = Locator.valueOf("Resource/Ball/yellow/Bag/parameters/owner");
|
||||
|
||||
runServiceInAllRealmTypes(RemoveParameterService.class, arg);
|
||||
|
|
|
@ -23,4 +23,48 @@
|
|||
</Activity>
|
||||
</Activity>
|
||||
|
||||
<Activity Id="activity_2" Name="Activity" Type="ActivityType">
|
||||
<Policies>
|
||||
<Policy Type="PlanningPolicy" Value="key:SimplePlanning" />
|
||||
<Policy Type="ConfirmationPolicy" Value="key:NoConfirmation" />
|
||||
</Policies>
|
||||
<Action Id="action_1" Name="Action 1" ResourceId="dummyId" ResourceType="dummyType" State="CREATED" Type="Use">
|
||||
<Policies>
|
||||
<Policy Type="PlanningPolicy" Value="key:SimplePlanning" />
|
||||
<Policy Type="ConfirmationPolicy" Value="key:NoConfirmation" />
|
||||
</Policies>
|
||||
<ValueChange StateId="dummyId" Time="2012-11-30T18:12:05.628+01:00" Value="5" Type="Integer" />
|
||||
</Action>
|
||||
<Activity Id="child_activity" Name="Child Activity" Type="childType">
|
||||
<Policies>
|
||||
<Policy Type="PlanningPolicy" Value="key:SimplePlanning" />
|
||||
<Policy Type="ConfirmationPolicy" Value="key:NoConfirmation" />
|
||||
</Policies>
|
||||
<Action Id="action_2" Name="Action 2" ResourceId="dummyId" ResourceType="dummyType" State="PLANNED" Type="Use" />
|
||||
<Action Id="action_3" Name="Action 3" ResourceId="dummyId" ResourceType="dummyType" State="CREATED" Type="Use" />
|
||||
</Activity>
|
||||
</Activity>
|
||||
|
||||
<Activity Id="activity_3" Name="Activity" Type="ActivityType">
|
||||
<Policies>
|
||||
<Policy Type="PlanningPolicy" Value="key:SimplePlanning" />
|
||||
<Policy Type="ConfirmationPolicy" Value="key:NoConfirmation" />
|
||||
</Policies>
|
||||
<Action Id="action_1" Name="Action 1" ResourceId="dummyId" ResourceType="dummyType" State="CREATED" Type="Use">
|
||||
<Policies>
|
||||
<Policy Type="PlanningPolicy" Value="key:SimplePlanning" />
|
||||
<Policy Type="ConfirmationPolicy" Value="key:NoConfirmation" />
|
||||
</Policies>
|
||||
<ValueChange StateId="dummyId" Time="2012-11-30T18:12:05.628+01:00" Value="5" Type="Integer" />
|
||||
</Action>
|
||||
<Activity Id="child_activity" Name="Child Activity" Type="childType">
|
||||
<Policies>
|
||||
<Policy Type="PlanningPolicy" Value="key:SimplePlanning" />
|
||||
<Policy Type="ConfirmationPolicy" Value="key:NoConfirmation" />
|
||||
</Policies>
|
||||
<Action Id="action_2" Name="Action 2" ResourceId="dummyId" ResourceType="dummyType" State="PLANNED" Type="Use" />
|
||||
<Action Id="action_3" Name="Action 3" ResourceId="dummyId" ResourceType="dummyType" State="CREATED" Type="Use" />
|
||||
</Activity>
|
||||
</Activity>
|
||||
|
||||
</StrolchModel>
|
Loading…
Reference in New Issue