use of org.cristalise.kernel.common.CannotManageException in project kernel by cristal-ise.
the class BulkImport method importItemPath.
public ItemPath importItemPath(ItemPath item, Object locker) throws PersistencyException {
try {
ItemPath itemPath = (ItemPath) importCluster.get(item, PATH + "/Item");
Gateway.getLookupManager().add(itemPath);
return itemPath;
} catch (ObjectCannotBeUpdated | ObjectAlreadyExistsException | CannotManageException e) {
Logger.error(e);
throw new PersistencyException(e.getMessage());
}
}
use of org.cristalise.kernel.common.CannotManageException in project kernel by cristal-ise.
the class ModuleActivity method create.
@Override
public Path create(AgentPath agentPath, boolean reset) throws ObjectNotFoundException, ObjectCannotBeUpdated, CannotManageException, ObjectAlreadyExistsException, InvalidDataException {
try {
domainPath = Bootstrap.verifyResource(ns, name, version, type.getTypeCode(), itemPath, getResourceLocation(), reset);
itemPath = domainPath.getItemPath();
} catch (Exception e) {
Logger.error(e);
throw new CannotManageException("Exception verifying module resource " + ns + "/" + name);
}
actDef = LocalObjectLoader.getActDef(name, version);
populateActivityDef();
CollectionArrayList colls;
try {
colls = actDef.makeDescCollections();
} catch (InvalidDataException e) {
Logger.error(e);
throw new CannotManageException("Could not create description collections for " + getName() + ".");
}
for (Collection<?> coll : colls.list) {
try {
Gateway.getStorage().put(itemPath, coll, null);
// create last collection
coll.setVersion(null);
Gateway.getStorage().put(itemPath, coll, null);
} catch (PersistencyException e) {
Logger.error(e);
throw new CannotManageException("Persistency exception storing description collections for " + getName() + ".");
}
}
return domainPath;
}
Aggregations