Package com.volantis.mcs.policies

Examples of com.volantis.mcs.policies.InternalPolicyFactory


            IFile file = (IFile) policyResource;

            // Read the model using JiBX
            is = file.getContents();
            ContentInput content = new BinaryContentInput(is);
            InternalPolicyFactory policyFactory =
                    InternalPolicyFactory.getInternalInstance();

            // Don't use schema validation, as we may have a partial layout,
            // with missing attributes and empty formats.
            // todo: re-enable validation by avoiding this overload once we have sorted out validation.
            JiBXReader reader =
                    policyFactory.createDangerousNonValidatingPolicyReader();

            String name = getPolicyName(policyResource);

            PolicyBuilder model =
                    (PolicyBuilder) reader.read(content, file.getName());
View Full Code Here


            // Read the model using JiBX
            is = file.getContents();
            final ContentInput content =
                new BinaryContentInput(is);
            final InternalPolicyFactory policyFactory =
                    InternalPolicyFactory.getInternalInstance();

            // Don't use schema validation, as we may have a partial layout,
            // with missing attributes and empty formats.
            // todo: re-enable validation by avoiding this overload once we have
            // sorted out validation.
            final JiBXReader reader =
                policyFactory.createDangerousNonValidatingPolicyReader();

            return (PolicyBuilder) reader.read(content, file.getName());
        } catch (CoreException e) {
            throw new PolicyFileAccessException(e);
        } catch (IOException e) {
View Full Code Here

     * @param resource
     */
    private void repositoryModelValidate(IResource resource) {
        InputStream is = null;
        try {
            InternalPolicyFactory factory =
                    InternalPolicyFactory.getInternalInstance();
            // todo: re-enable validation by avoiding this overload once we have
            // sorted out validation.
            JiBXReader reader = factory.createDangerousNonValidatingPolicyReader();
            if (resource instanceof IFile && resource.exists()) {
                IFile file = (IFile) resource;
                is = file.getContents();
                BinaryContentInput content = new BinaryContentInput(is);
                Object theme = reader.read(content, file.getName());
View Full Code Here

                              FormatConstants.WIDTH_UNITS_VALUE_PERCENT);
         builder.attributesRead();
         builder.popFormat();
         Layout layout = builder.getLayout();

         InternalPolicyFactory policyFactory = (InternalPolicyFactory)
                 PolicyFactory.getDefaultInstance();
         InternalLayoutContentBuilder layoutContent =
                 policyFactory.createLayoutContentBuilder();
         layoutContent.setLayout(layout);

         StyleSheetActivator styleSheetActivator =
                 new StyleSheetActivatorImpl(null, null);
View Full Code Here

                             FormatConstants.WIDTH_UNITS_VALUE_PERCENT);
        builder.attributesRead();
        builder.popFormat();
        Layout layout = builder.getLayout();

        InternalPolicyFactory policyFactory = (InternalPolicyFactory)
                PolicyFactory.getDefaultInstance();
        InternalLayoutContentBuilder layoutContent =
                policyFactory.createLayoutContentBuilder();
        layoutContent.setLayout(layout);

        StyleSheetActivator styleSheetActivator =
                new StyleSheetActivatorImpl(null, null);
View Full Code Here

                             FormatConstants.WIDTH_UNITS_VALUE_PERCENT);
        builder.attributesRead();
        builder.popFormat();
        Layout layout = builder.getLayout();

        InternalPolicyFactory policyFactory = (InternalPolicyFactory)
                PolicyFactory.getDefaultInstance();
        InternalLayoutContentBuilder layoutContent =
                policyFactory.createLayoutContentBuilder();
        layoutContent.setLayout(layout);

        StyleSheetActivator styleSheetActivator =
                new StyleSheetActivatorImpl(null, null);
View Full Code Here

            throws ResourceMigrationException, IOException {

        String xml = migrator.migratePolicy(stream, url);
        StringContentInput content = new StringContentInput(xml);

        InternalPolicyFactory factory =
                InternalPolicyFactory.getInternalInstance();

        JiBXReader jibxReader = factory.createPolicyReader();

        Object object = jibxReader.read(content, url);
        return object;
    }
View Full Code Here

TOP

Related Classes of com.volantis.mcs.policies.InternalPolicyFactory

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.