Package org.fao.geonet.exceptions

Examples of org.fao.geonet.exceptions.OperationAbortedEx


            // delete online resource
            File dir  = new File(Lib.resource.getDir(context, access, metadataId));
            File file = new File(dir, fileName);

            if (file.exists() && !file.delete())
                throw new OperationAbortedEx("unable to delete resource");

            storeFileUploadDeleteRequest(context, metadataId, fileName);

        } catch (Exception ex) {
            Log.error(Geonet.RESOURCES, "DefaultResourceRemoveHandler (onDelete): " + ex.getMessage());
View Full Code Here


        }
      } else {
        try {
          url = new URL(urlStr);
        } catch (MalformedURLException mu) {
           throw new OperationAbortedEx("URL "+urlStr+" is malformed: "+mu.getMessage());
        }
      }
    }

    // -- test if schema to be updated exists, if not then chuck a fit and exit
    if (!scm.existsSchema(schema)) {
     throw new OperationAbortedEx("Schema doesn't exist");
    }

    SchemaUtils su = new SchemaUtils();
    return su.updateSchema(context, schema, fname, url, uuid, scm);
  }
View Full Code Here

TOP

Related Classes of org.fao.geonet.exceptions.OperationAbortedEx

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.