Package com.volantis.mcs.repository

Examples of com.volantis.mcs.repository.RepositoryException


        // 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));
        }
        Namespace namespace = patternElement.getNamespace();
View Full Code Here


        //   <regularExpression>text()</regularExpression>
        // </headerPattern>
        Element patternElement =
                accessor.retrieveDeviceIdentificationElement(device);
        if (patternElement == null) {
            throw new RepositoryException(
                    exceptionLocalizer.format(
                            "identification-element-missing",
                            device));
        }
        return getSecondaryPatterns(patternElement);
View Full Code Here

            Element regularExpressionElement = headerElement.getChild(
                    DeviceRepositorySchemaConstants.
                    REGULAR_EXPRESSION_ELEMENT_NAME,
                    namespace);
            if (regularExpressionElement == null) {
                throw new RepositoryException(
                        exceptionLocalizer.format(
                                "element-missing",
                                DeviceRepositorySchemaConstants.
                                REGULAR_EXPRESSION_ELEMENT_NAME));
            }
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));
        }
        Namespace namespace = patternElement.getNamespace();
View Full Code Here

            // Finally remove the policy from the definitions document.
            policyElement.detach();

        } catch (IllegalArgumentException e) {
            throw new RepositoryException(e);
        } catch (XPathException e) {
            throw new RepositoryException(e);
        }
    }
View Full Code Here

                                };
                                LOGGER.error("device-not-found", params);
                                String message =
                                        EXCEPTION_LOCALIZER.
                                        format("device-not-found", params);
                                throw new UndeclaredThrowableException(new
                                        RepositoryException(message));
                            } else {
                                DeviceODOMElement parent = (DeviceODOMElement)
                                        deviceIDElement.getParent();
                                if (parent == null) {
                                    LOGGER.error("device-no-parent", deviceName);
                                    String message =
                                            EXCEPTION_LOCALIZER.
                                            format("device-no-parent",
                                                    deviceName);
                                    throw new UndeclaredThrowableException(new
                                            RepositoryException(message));
                                } else {
                                    parent.submitRestorableName(deviceName);
                                }
                            }
View Full Code Here

        // load the identification object
        final Identification identification = loadIdentification(fileName);

        if (identification == null) {
            throw new RepositoryException(EXCEPTION_LOCALIZER.format(
                "device-repository-file-missing",
                DeviceRepositoryConstants.IDENTIFICATION_XML));
        }

        // create the repository
View Full Code Here

                object = jibxReader.read(content,
                    DeviceRepositoryConstants.IDENTIFICATION_XML);
            }
            return (Identification) object;
        } catch (IOException e) {
            throw new RepositoryException(EXCEPTION_LOCALIZER.format(
                "cannot-read-object", new Object[]{
                    Identification.class.getName(),
                    DeviceRepositoryConstants.IDENTIFICATION_XML}), e);
        }
    }
View Full Code Here

      return properties;
    }
    catch(IllegalAccessException e) {
      logger.error("unexpected-sql-exception", e);
      throw new RepositoryException(e);
    }
    catch(InvocationTargetException e) {
      logger.error ("unexpected-sql-exception", e);
      throw new RepositoryException(e);
    }
  }
View Full Code Here

        JDBCRepositoryConnection connection =
                new JDBCRepositoryConnectionImpl(repository, true,
                                             "name", "password", true) {
                    public void closeConnection() throws RepositoryException {
                        throw new RepositoryException(exceptionMessage);
                    }
                };

        try {
            repository.closeConnection(connection);
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.