Package com.volantis.mcs.repository

Examples of com.volantis.mcs.repository.RepositoryException


                List policyDescriptors;
                try {
                    policyDescriptors =
                        srcAccessor.retrievePolicyDescriptors(policyName);
                } catch (RepositoryException e) {
                    throw new RepositoryException(
                            exceptionLocalizer.format(
                                    "cannot-read-policy-descriptor",
                        policyName), e);
                }

                for (Iterator iter = policyDescriptors.iterator();
                     iter.hasNext();) {

                    final PolicyDescriptor policyDescriptor =
                        (PolicyDescriptor) iter.next();
                    // Write the descriptors to the destination for this policy.
                    try {
                        dstAccessor.addPolicyDescriptor(policyName,
                                policyDescriptor);
                    } catch (RepositoryException e) {
                        throw new RepositoryException(
                                exceptionLocalizer.format(
                                        "cannot-write-policy-descriptor",
                            new Object[]{policyName, policyDescriptor}), e);
                    }
                }
View Full Code Here


            throws RepositoryException {
        // Delete the descriptor in the destination for this category.
        try {
            accessor.removeAllCategoryDescriptors();
        } catch (RepositoryException e) {
            throw new RepositoryException(
                    exceptionLocalizer.format(
                            "cannot-remove-all-category-descriptors"),
                    e);
        }
    }
View Full Code Here

                try {
                    categoryDescriptors =
                        srcAccessor.retrieveCategoryDescriptors(
                            categoryName);
                } catch (RepositoryException e) {
                    throw new RepositoryException(
                        exceptionLocalizer.format(
                            "cannot-read-category-descriptor", categoryName),
                        e);
                }

                for (Iterator iter = categoryDescriptors.iterator();
                     iter.hasNext();) {

                    final CategoryDescriptor categoryDescriptor =
                        (CategoryDescriptor) iter.next();
                    // Write the descriptors to the destination for this
                    // category.
                    try {
                        dstAccessor.addCategoryDescriptor(
                            categoryName, categoryDescriptor);
                    } catch (RepositoryException e) {
                        throw new RepositoryException(
                                exceptionLocalizer.format(
                                        "cannot-write-policy-descriptor",
                            new Object[]{categoryName, categoryDescriptor}), e);
                    }
                }
View Full Code Here

        try {
            device = srcDeviceAccessor.retrieveDevice(deviceName);

        } catch (RepositoryException e) {
            // Try to report the name of the policy we couldn't read
            throw new RepositoryException(
                    exceptionLocalizer.format("policy-read-failure",
                            deviceName),
                    e);
        }
View Full Code Here

        final String deviceName = device.getName();
        try {
            accessor.updateDevice(device);
        } catch (RepositoryException e) {
            // Try and report the object we failed to update.
            throw new RepositoryException(exceptionLocalizer.format("policy-update-failure",
                    deviceName),
                    e);
        }
    }
View Full Code Here

                PolicyDescriptor policyDescriptor;
                try {
                    policyDescriptor = accessor.retrievePolicyDescriptor(
                            policyName, Locale.getDefault());
                } catch (RepositoryException e) {
                    throw new RepositoryException(
                            exceptionLocalizer.format(
                                    "cannot-read-policy-descriptor",
                                    policyName),
                            e);
                }
View Full Code Here

        synchronized (connections) {
            terminated = true;
        }

        if (exception) {
            throw new RepositoryException(EXCEPTION_LOCALIZER.format(
                    "repository-termination-error"));
        }
    }
View Full Code Here

     *
     */
    public void terminate()
            throws RepositoryException {

        RepositoryException exception = null;

        try {
            terminateAllConnections();
        } catch (RepositoryException re) {
            exception = re;
View Full Code Here

        }

        InternalDevice device = deviceReader.getDevice(deviceName);

        if (device == null) {
            throw new RepositoryException(exceptionLocalizer.format(
                    "unknown-device-exception",
                    deviceName));
        }

        return device;
View Full Code Here

  public boolean beginOperationSet ()
    throws RepositoryException {
    try {
      getConnection(); // ensure we have a connection
      if (!connection.getAutoCommit ()) {
        throw new RepositoryException(EXCEPTION_LOCALIZER.format(
                "repository-nested-operation-set"));
      }
      connection.setAutoCommit (false);

      int isolationLevel = Connection.TRANSACTION_SERIALIZABLE;
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.