diff options
| author | Andrew Branson <andrew.branson@cern.ch> | 2014-10-03 23:18:47 +0200 |
|---|---|---|
| committer | Andrew Branson <andrew.branson@cern.ch> | 2014-10-03 23:18:47 +0200 |
| commit | b68ea0f2b12c4c5189c5fc7c182a1b242dc63579 (patch) | |
| tree | 85b1cc4713ba978c044bfa0656f9115c9f9bf9e3 /src/main/java/com/c2kernel/lifecycle/instance/predefined/AddNewCollectionDescription.java | |
| parent | 275d0bbf555c8917be82ce4cc21eb4cabb00f4c5 (diff) | |
Rolled back the renaming of existing exceptions.
Diffstat (limited to 'src/main/java/com/c2kernel/lifecycle/instance/predefined/AddNewCollectionDescription.java')
| -rw-r--r-- | src/main/java/com/c2kernel/lifecycle/instance/predefined/AddNewCollectionDescription.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/com/c2kernel/lifecycle/instance/predefined/AddNewCollectionDescription.java b/src/main/java/com/c2kernel/lifecycle/instance/predefined/AddNewCollectionDescription.java index 6eb69f3..99fd666 100644 --- a/src/main/java/com/c2kernel/lifecycle/instance/predefined/AddNewCollectionDescription.java +++ b/src/main/java/com/c2kernel/lifecycle/instance/predefined/AddNewCollectionDescription.java @@ -26,9 +26,9 @@ import java.util.Arrays; import com.c2kernel.collection.AggregationDescription;
import com.c2kernel.collection.CollectionDescription;
import com.c2kernel.collection.DependencyDescription;
-import com.c2kernel.common.InvalidData;
-import com.c2kernel.common.ObjectAlreadyExists;
-import com.c2kernel.common.ObjectNotFound;
+import com.c2kernel.common.InvalidDataException;
+import com.c2kernel.common.ObjectAlreadyExistsException;
+import com.c2kernel.common.ObjectNotFoundException;
import com.c2kernel.common.PersistencyException;
import com.c2kernel.lookup.AgentPath;
import com.c2kernel.lookup.ItemPath;
@@ -63,7 +63,7 @@ public class AddNewCollectionDescription extends PredefinedStep */
@Override
protected String runActivityLogic(AgentPath agent, ItemPath item,
- int transitionID, String requestData) throws InvalidData, ObjectAlreadyExists, PersistencyException {
+ int transitionID, String requestData) throws InvalidDataException, ObjectAlreadyExistsException, PersistencyException {
String collName;
String collType;
@@ -72,7 +72,7 @@ public class AddNewCollectionDescription extends PredefinedStep String[] params = getDataList(requestData);
if (Logger.doLog(3)) Logger.msg(3, "AddNewCollectionDescription: called by "+agent+" on "+item+" with parameters "+Arrays.toString(params));
if (params.length != 2)
- throw new InvalidData("AddNewCollectionDescription: Invalid parameters "+Arrays.toString(params));
+ throw new InvalidDataException("AddNewCollectionDescription: Invalid parameters "+Arrays.toString(params));
collName = params[0];
collType = params[1];
@@ -80,8 +80,8 @@ public class AddNewCollectionDescription extends PredefinedStep // check if collection already exists
try {
Gateway.getStorage().get(item, ClusterStorage.COLLECTION+"/"+collName+"/last", null);
- throw new ObjectAlreadyExists("Collection '"+collName+"' already exists");
- } catch (ObjectNotFound ex) {
+ throw new ObjectAlreadyExistsException("Collection '"+collName+"' already exists");
+ } catch (ObjectNotFoundException ex) {
// collection doesn't exist
} catch (PersistencyException ex) {
Logger.error(ex);
@@ -96,7 +96,7 @@ public class AddNewCollectionDescription extends PredefinedStep if (collType.equals("Dependency"))
newCollDesc = new DependencyDescription(collName);
else
- throw new InvalidData("AddNewCollectionDescription: Invalid collection type specified: '"+collType+"'. Must be Aggregation or Dependency.");
+ throw new InvalidDataException("AddNewCollectionDescription: Invalid collection type specified: '"+collType+"'. Must be Aggregation or Dependency.");
// store it
try {
|
