diff options
Diffstat (limited to 'src/main/java/com/c2kernel/entity/ItemImplementation.java')
| -rw-r--r-- | src/main/java/com/c2kernel/entity/ItemImplementation.java | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/main/java/com/c2kernel/entity/ItemImplementation.java b/src/main/java/com/c2kernel/entity/ItemImplementation.java index a33607b..9098e2a 100644 --- a/src/main/java/com/c2kernel/entity/ItemImplementation.java +++ b/src/main/java/com/c2kernel/entity/ItemImplementation.java @@ -26,10 +26,10 @@ import com.c2kernel.collection.Collection; import com.c2kernel.collection.CollectionArrayList;
import com.c2kernel.common.AccessRightsException;
import com.c2kernel.common.InvalidCollectionModification;
-import com.c2kernel.common.InvalidData;
-import com.c2kernel.common.InvalidTransition;
-import com.c2kernel.common.ObjectAlreadyExists;
-import com.c2kernel.common.ObjectNotFound;
+import com.c2kernel.common.InvalidDataException;
+import com.c2kernel.common.InvalidTransitionException;
+import com.c2kernel.common.ObjectAlreadyExistsException;
+import com.c2kernel.common.ObjectNotFoundException;
import com.c2kernel.common.PersistencyException;
import com.c2kernel.common.SystemKey;
import com.c2kernel.entity.agent.JobArrayList;
@@ -74,7 +74,7 @@ public class ItemImplementation implements ItemOperations { @Override
public void initialise(SystemKey agentId, String propString, String initWfString,
String initCollsString) throws AccessRightsException,
- InvalidData, PersistencyException
+ InvalidDataException, PersistencyException
{
Logger.msg(5, "Item::initialise("+mItemPath+") - agent:"+agentId);
Object locker = new Object();
@@ -88,7 +88,7 @@ public class ItemImplementation implements ItemOperations { // must supply properties
if (propString == null || propString.length() == 0) {
- throw new InvalidData("No properties supplied");
+ throw new InvalidDataException("No properties supplied");
}
// store properties
@@ -102,7 +102,7 @@ public class ItemImplementation implements ItemOperations { + ") - Properties were invalid: " + propString);
Logger.error(ex);
mStorage.abort(locker);
- throw new InvalidData("Properties were invalid");
+ throw new InvalidDataException("Properties were invalid");
}
// Store an event and the initial properties
@@ -138,7 +138,7 @@ public class ItemImplementation implements ItemOperations { + ") - Workflow was invalid: " + initWfString);
Logger.error(ex);
mStorage.abort(locker);
- throw new InvalidData("Workflow was invalid");
+ throw new InvalidDataException("Workflow was invalid");
}
// init collections
@@ -155,7 +155,7 @@ public class ItemImplementation implements ItemOperations { + initCollsString);
Logger.error(ex);
mStorage.abort(locker);
- throw new InvalidData("Collections were invalid");
+ throw new InvalidDataException("Collections were invalid");
}
}
@@ -173,9 +173,9 @@ public class ItemImplementation implements ItemOperations { @Override
public String requestAction(SystemKey agentId, String stepPath, int transitionID,
String requestData) throws AccessRightsException,
- InvalidTransition, ObjectNotFound,
- InvalidData, PersistencyException,
- ObjectAlreadyExists, InvalidCollectionModification {
+ InvalidTransitionException, ObjectNotFoundException,
+ InvalidDataException, PersistencyException,
+ ObjectAlreadyExistsException, InvalidCollectionModification {
try {
@@ -200,21 +200,21 @@ public class ItemImplementation implements ItemOperations { } catch (AccessRightsException ex) {
Logger.msg("Propagating AccessRightsException back to the calling agent");
throw ex;
- } catch (InvalidTransition ex) {
+ } catch (InvalidTransitionException ex) {
Logger.msg("Propagating InvalidTransitionException back to the calling agent");
throw ex;
- } catch (ObjectNotFound ex) {
+ } catch (ObjectNotFoundException ex) {
Logger.msg("Propagating ObjectNotFoundException back to the calling agent");
throw ex;
// errors
} catch (InvalidItemPathException ex) {
Logger.error(ex);
throw new AccessRightsException("Invalid Agent Id: " + agentId);
- } catch (InvalidData ex) {
+ } catch (InvalidDataException ex) {
Logger.error(ex);
Logger.msg("Propagating InvalidDataException back to the calling agent");
throw ex;
- } catch (ObjectAlreadyExists ex) {
+ } catch (ObjectAlreadyExistsException ex) {
Logger.error(ex);
Logger.msg("Propagating ObjectAlreadyExistsException back to the calling agent");
throw ex;
@@ -226,7 +226,7 @@ public class ItemImplementation implements ItemOperations { Logger.error("Unknown Error: requestAction on " + mItemPath
+ " by " + agentId + " executing " + stepPath);
Logger.error(ex);
- throw new InvalidData(
+ throw new InvalidDataException(
"Extraordinary Exception during execution:"
+ ex.getClass().getName() + " - "
+ ex.getMessage());
@@ -235,7 +235,7 @@ public class ItemImplementation implements ItemOperations { @Override
public String queryLifeCycle(SystemKey agentId, boolean filter)
- throws AccessRightsException, ObjectNotFound,
+ throws AccessRightsException, ObjectNotFoundException,
PersistencyException {
Logger.msg(1, "TraceableEntity::queryLifeCycle(" + mItemPath
+ ") - agent: " + agentId);
@@ -275,7 +275,7 @@ public class ItemImplementation implements ItemOperations { @Override
public String queryData(String path) throws AccessRightsException,
- ObjectNotFound, PersistencyException {
+ ObjectNotFoundException, PersistencyException {
String result = "";
@@ -303,7 +303,7 @@ public class ItemImplementation implements ItemOperations { // marshall it, or in the case of an outcome get the data.
result = Gateway.getMarshaller().marshall(obj);
}
- } catch (ObjectNotFound ex) {
+ } catch (ObjectNotFoundException ex) {
throw ex;
} catch (Throwable ex) {
Logger.warning("TraceableEntity::queryData(" + mItemPath
|
