Package com.volantis.mcs.repository

Examples of com.volantis.mcs.repository.RepositoryException


            if (file.isDirectory()) {
                deleteDir(file);
            } else {
                if (!file.delete()) {
                    throw new RepositoryException(EXCEPTION_LOCALIZER.format(
                            "cannot-delete-file", file.getAbsolutePath()));
                }
            }
        }

        if (!dir.delete()) {
            throw new RepositoryException(EXCEPTION_LOCALIZER.format(
                    "directory-cannot-be-deleted", dir.getAbsolutePath()));
        }
    }
View Full Code Here


    }

    // Javadoc inherited
    public void beginBatchOperation(TransactionLevel level) throws RepositoryException {
        if (!supportsTransactionLevel(level)) {
            throw new RepositoryException("Invalid transaction level");
        }
    }
View Full Code Here

                    FileExtension.getFileExtensionForPolicyType(policyType);
            IFolder policySourceFolder = project.getFolder(getPolicySourcePath());
            addPolicyNames(policySourceFolder, extension, policyNames,
                    policySourceFolder.getProjectRelativePath());
        } catch (CoreException ce) {
            throw new RepositoryException(ce);
        }
        return policyNames;
    }
View Full Code Here

            IFile policyFile = getFileFromPolicyName(name);
            if (policyFile.exists()) {
                policy = standaloneAccessor.loadPolicy(policyFile);
            }
        } catch (CoreException ce) {
            throw new RepositoryException(ce);
        } catch (PolicyFileAccessException pfae) {
            throw new RepositoryException(pfae);
        }

        return policy;
    }
View Full Code Here

        try {
            IFile policyFile = getFileFromPolicyName(policy.getName());
            standaloneAccessor.createPolicy(policyFile.getFullPath(), policy,
                new GenericCreatePolicyConfiguration(null));
        } catch (CoreException ce) {
            throw new RepositoryException(ce);
        } catch (PolicyFileAccessException pfae) {
            throw new RepositoryException(pfae);
        }
    }
View Full Code Here

            if (policyFile.exists()) {
                standaloneAccessor.deletePolicy(policyFile);
                removed = true;
            }
        } catch (CoreException ce) {
            throw new RepositoryException(ce);
        } catch (PolicyFileAccessException pfae) {
            throw new RepositoryException(pfae);
        }
        return removed;
    }
View Full Code Here

        boolean updated = false;
        try {
            IFile policyFile = getFileFromPolicyName(policy.getName());
            standaloneAccessor.savePolicy(policy, policyFile, new NullProgressMonitor());
        } catch (CoreException ce) {
            throw new RepositoryException(ce);
        } catch (PolicyFileAccessException pfae) {
            throw new RepositoryException(pfae);
        }
        return updated;
    }
View Full Code Here

     * @throws RepositoryException if an error occurs.
     */
    public String[] getDeviceTACs(String device) throws RepositoryException {
        Element tacElement = accessor.retrieveTACDeviceElement(device);
        if (tacElement == null) {
            throw new RepositoryException(
                    exceptionLocalizer.format(
                            "tac-device-element-missing",
                            device));
        }
        Namespace namespace = tacElement.getNamespace();
View Full Code Here

        }
        // obtain the tac element for the device.
        Element tacElement =
                accessor.retrieveTACDeviceElement(device);
        if (tacElement == null) {
            throw new RepositoryException(
                    exceptionLocalizer.format(
                            "tac-device-element-missing",
                            device));
        }
View Full Code Here

        // obtain the pattern element for the device. This will contain
        // both the userAgent and header patterns.
        Element patternElement =
                accessor.retrieveDeviceIdentificationElement(device);
        if (patternElement == null) {
            throw new RepositoryException(
                    exceptionLocalizer.format(
                            "identification-element-missing",
                            device));
        }
        return getPrimaryPatterns(patternElement);
View Full Code Here

TOP

Related Classes of com.volantis.mcs.repository.RepositoryException

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.