- */
-public class ServiceArgument implements Serializable {
- private static final long serialVersionUID = 1L;
-
- /**
- *
- * Set this to the realm in which the service should operate
- *
- *
- *
- * realm = StrolchConstants.DEFAULT_REALM
- *
- */
- public String realm = StrolchConstants.DEFAULT_REALM;
-}
diff --git a/src/main/java/li/strolch/service/ServiceHandler.java b/src/main/java/li/strolch/service/ServiceHandler.java
deleted file mode 100644
index 32ca19a46..000000000
--- a/src/main/java/li/strolch/service/ServiceHandler.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright 2013 Robert von Burg
- *
- * 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 ch.eitchnet.privilege.model.Certificate;
-
-public interface ServiceHandler {
-
- public U doService(Certificate certificate,
- Service service, T argument);
-
- public U doService(Certificate certificate, Service service);
-}
\ No newline at end of file
diff --git a/src/main/java/li/strolch/service/ServiceResult.java b/src/main/java/li/strolch/service/ServiceResult.java
deleted file mode 100644
index 5b846b200..000000000
--- a/src/main/java/li/strolch/service/ServiceResult.java
+++ /dev/null
@@ -1,122 +0,0 @@
-/*
- * Copyright 2013 Robert von Burg
- *
- * 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.io.Serializable;
-
-/**
- * @author Robert von Burg
- */
-public class ServiceResult implements Serializable {
- private static final long serialVersionUID = 1L;
- private ServiceResultState state;
- private String message;
- private Throwable throwable;
-
- public ServiceResult() {
- //
- }
-
- /**
- * @param state
- */
- public ServiceResult(ServiceResultState state) {
- this.state = state;
- }
-
- /**
- * @param state
- * @param message
- * @param throwable
- */
- public ServiceResult(ServiceResultState state, String message, Throwable throwable) {
- this.state = state;
- this.message = message;
- this.throwable = throwable;
- }
-
- /**
- * @return true if the state is {@link ServiceResultState#SUCCESS}
- */
- public boolean isOk() {
- return this.state == ServiceResultState.SUCCESS;
- }
-
- /**
- * @return the state
- */
- public ServiceResultState getState() {
- return this.state;
- }
-
- /**
- * @param state
- * the state to set
- */
- public void setState(ServiceResultState state) {
- this.state = state;
- }
-
- /**
- * @return the message
- */
- public String getMessage() {
- return this.message;
- }
-
- /**
- * @param message
- * the message to set
- */
- public void setMessage(String message) {
- this.message = message;
- }
-
- /**
- * @return the throwable
- */
- public Throwable getThrowable() {
- return this.throwable;
- }
-
- /**
- * @param throwable
- * the throwable to set
- */
- public void setThrowable(Throwable throwable) {
- this.throwable = throwable;
- }
-
- public static ServiceResult success() {
- return new ServiceResult(ServiceResultState.SUCCESS, null, null);
- }
-
- public static ServiceResult success(String msg) {
- return new ServiceResult(ServiceResultState.SUCCESS, msg, null);
- }
-
- public static ServiceResult warning(String warning) {
- return new ServiceResult(ServiceResultState.WARNING, warning, null);
- }
-
- public static ServiceResult warning(String warning, Throwable t) {
- return new ServiceResult(ServiceResultState.WARNING, warning, t);
- }
-
- public static ServiceResult failed(String error, Throwable t) {
- return new ServiceResult(ServiceResultState.FAILED, error, t);
- }
-}
diff --git a/src/main/java/li/strolch/service/ServiceResultState.java b/src/main/java/li/strolch/service/ServiceResultState.java
deleted file mode 100644
index 9037211e9..000000000
--- a/src/main/java/li/strolch/service/ServiceResultState.java
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright 2013 Robert von Burg
- *
- * 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;
-
-/**
- * @author Robert von Burg
- *
- */
-public enum ServiceResultState {
-
- SUCCESS, WARNING, FAILED;
-}
diff --git a/src/test/java/li/strolch/service/test/AbstractServiceTest.java b/src/test/java/li/strolch/service/test/AbstractServiceTest.java
index b8aa565fb..0dff3b8a1 100644
--- a/src/test/java/li/strolch/service/test/AbstractServiceTest.java
+++ b/src/test/java/li/strolch/service/test/AbstractServiceTest.java
@@ -17,7 +17,7 @@ package li.strolch.service.test;
import java.io.File;
-import li.strolch.service.ServiceHandler;
+import li.strolch.service.api.ServiceHandler;
import li.strolch.testbase.runtime.RuntimeMock;
import org.junit.AfterClass;
diff --git a/src/test/java/li/strolch/service/test/GreetingResult.java b/src/test/java/li/strolch/service/test/GreetingResult.java
index 656dedc4e..6b37c252b 100644
--- a/src/test/java/li/strolch/service/test/GreetingResult.java
+++ b/src/test/java/li/strolch/service/test/GreetingResult.java
@@ -15,8 +15,8 @@
*/
package li.strolch.service.test;
-import li.strolch.service.ServiceResult;
-import li.strolch.service.ServiceResultState;
+import li.strolch.service.api.ServiceResult;
+import li.strolch.service.api.ServiceResultState;
public class GreetingResult extends ServiceResult {
private static final long serialVersionUID = 1L;
diff --git a/src/test/java/li/strolch/service/test/GreetingService.java b/src/test/java/li/strolch/service/test/GreetingService.java
index b599034fd..da5a1af29 100644
--- a/src/test/java/li/strolch/service/test/GreetingService.java
+++ b/src/test/java/li/strolch/service/test/GreetingService.java
@@ -17,8 +17,8 @@ package li.strolch.service.test;
import java.text.MessageFormat;
-import li.strolch.service.AbstractService;
-import li.strolch.service.ServiceArgument;
+import li.strolch.service.api.AbstractService;
+import li.strolch.service.api.ServiceArgument;
import li.strolch.service.test.GreetingService.GreetingArgument;
import ch.eitchnet.utils.helper.StringHelper;
diff --git a/src/test/java/li/strolch/service/test/NoPrivilegeServiceTest.java b/src/test/java/li/strolch/service/test/NoPrivilegeServiceTest.java
index 8f1fbd2a0..7acdea3a8 100644
--- a/src/test/java/li/strolch/service/test/NoPrivilegeServiceTest.java
+++ b/src/test/java/li/strolch/service/test/NoPrivilegeServiceTest.java
@@ -20,7 +20,7 @@ import static org.junit.Assert.assertThat;
import java.io.File;
-import li.strolch.service.ServiceHandler;
+import li.strolch.service.api.ServiceHandler;
import li.strolch.service.test.GreetingService.GreetingArgument;
import li.strolch.testbase.runtime.RuntimeMock;
diff --git a/src/test/java/li/strolch/service/test/ServiceTest.java b/src/test/java/li/strolch/service/test/ServiceTest.java
index 37e1d91f3..616f8c041 100644
--- a/src/test/java/li/strolch/service/test/ServiceTest.java
+++ b/src/test/java/li/strolch/service/test/ServiceTest.java
@@ -60,7 +60,7 @@ public class ServiceTest extends AbstractServiceTest {
@Test
public void shouldFailWithNoAccess() {
this.thrown.expect(AccessDeniedException.class);
- this.thrown.expectMessage("User jill does not have Privilege li.strolch.service.Service"); //$NON-NLS-1$
+ this.thrown.expectMessage("User jill does not have Privilege li.strolch.service.api.Service"); //$NON-NLS-1$
Certificate certificate = runtimeMock.getPrivilegeHandler().authenticate("jill", "jill".getBytes()); //$NON-NLS-1$//$NON-NLS-2$
try {
diff --git a/src/test/java/li/strolch/service/test/TestService.java b/src/test/java/li/strolch/service/test/TestService.java
index d53d59291..a3e2df4e8 100644
--- a/src/test/java/li/strolch/service/test/TestService.java
+++ b/src/test/java/li/strolch/service/test/TestService.java
@@ -15,9 +15,9 @@
*/
package li.strolch.service.test;
-import li.strolch.service.AbstractService;
-import li.strolch.service.ServiceArgument;
-import li.strolch.service.ServiceResult;
+import li.strolch.service.api.AbstractService;
+import li.strolch.service.api.ServiceArgument;
+import li.strolch.service.api.ServiceResult;
/**
* @author Robert von Burg
diff --git a/src/test/resources/withPrivilegeRuntime/config/PrivilegeModel.xml b/src/test/resources/withPrivilegeRuntime/config/PrivilegeModel.xml
index 28c007077..848bbe71d 100644
--- a/src/test/resources/withPrivilegeRuntime/config/PrivilegeModel.xml
+++ b/src/test/resources/withPrivilegeRuntime/config/PrivilegeModel.xml
@@ -56,7 +56,7 @@
-
+
true
@@ -65,7 +65,7 @@
-
+
li.strolch.service.test.GreetingService
diff --git a/src/test/resources/withPrivilegeRuntime/config/StrolchConfiguration.xml b/src/test/resources/withPrivilegeRuntime/config/StrolchConfiguration.xml
index fb9ed15a5..27d4a47bc 100644
--- a/src/test/resources/withPrivilegeRuntime/config/StrolchConfiguration.xml
+++ b/src/test/resources/withPrivilegeRuntime/config/StrolchConfiguration.xml
@@ -9,8 +9,8 @@
ServiceHandler
- li.strolch.service.ServiceHandler
- li.strolch.service.DefaultServiceHandler
+ li.strolch.service.api.ServiceHandler
+ li.strolch.service.api.DefaultServiceHandler
true
diff --git a/src/test/resources/withoutPrivilegeRuntime/config/StrolchConfiguration.xml b/src/test/resources/withoutPrivilegeRuntime/config/StrolchConfiguration.xml
index 76e96a2c8..c250eb161 100644
--- a/src/test/resources/withoutPrivilegeRuntime/config/StrolchConfiguration.xml
+++ b/src/test/resources/withoutPrivilegeRuntime/config/StrolchConfiguration.xml
@@ -9,8 +9,8 @@
ServiceHandler
- li.strolch.service.ServiceHandler
- li.strolch.service.DefaultServiceHandler
+ li.strolch.service.api.ServiceHandler
+ li.strolch.service.api.DefaultServiceHandler
true