Examples of PolicyBuilder


Examples of com.volantis.mcs.policies.PolicyBuilder

    public Policy retrievePolicy(String name)
            throws RepositoryException {

        Policy policy = null;
        final PolicyBuilder policyBuilder =
                accessor.retrievePolicyBuilder(connection, project, name);
        if (policyBuilder != null) {
            policy = policyBuilder.getPolicy();
        }
        return policy;
    }
View Full Code Here

Examples of com.volantis.mcs.policies.PolicyBuilder

        if (getInteractionModel() == null) {
            setProject(file.getProject());
            PolicyFileAccessor policyFileAccessor = getPolicyFileAccessor();

            // Load the policy and grow the proxy
            PolicyBuilder policy = policyFileAccessor.loadPolicy(file);
            policy = preProcessPolicy(policy);
            final Proxy proxy = policyFileAccessor.wrapPolicy(policy,
                    getModelDescriptor(), getProject());

            // Revalidate the model on all changes
View Full Code Here

Examples of com.volantis.mcs.policies.PolicyBuilder

        }
    }

    // Javadoc inherited
    public PolicyBuilder getPolicyBuilder(String name) throws RepositoryException {
        PolicyBuilder policy = null;
        try {
            IFile policyFile = getFileFromPolicyName(name);
            if (policyFile.exists()) {
                policy = standaloneAccessor.loadPolicy(policyFile);
            }
View Full Code Here

Examples of com.volantis.mcs.policies.PolicyBuilder

        if (saveAsFile != null) {
            file = saveAsFile;
        }

        PolicyBuilder builder = (PolicyBuilder)
                getInteractionModel().getModelObject();
        try {
            getPolicyFileAccessor().savePolicy(builder, saveAsFile, monitor);
        } catch (PolicyFileAccessException pfae) {
            EclipseCommonPlugin.handleError(ABPlugin.getDefault(), pfae);
View Full Code Here

Examples of com.volantis.mcs.policies.PolicyBuilder

            JiBXReader reader =
                    policyFactory.createDangerousNonValidatingPolicyReader();

            String name = getPolicyName(policyResource);

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

Examples of com.volantis.mcs.policies.PolicyBuilder

    private Boolean useProjectPropertiesPage = Boolean.FALSE;

    // Javadoc inherited
    public boolean performFinish() {
        PolicyBuilder policyBuilder = getPolicy();
        try {
            // Generate the path to which the policy will be written
            final IPath containerPath = creationPage.getContainerFullPath();
            IPath newPolicyPath = containerPath.append(creationPage.getPolicyName());
            newPolicyPath = newPolicyPath.
View Full Code Here

Examples of com.volantis.mcs.policies.PolicyBuilder

       }


    protected PolicyBuilder getPolicy() {
        List policies = new ArrayList();
        PolicyBuilder policy = getPolicyBuilder();
        policies.add(policy);

        for (int i = 0; i < policyPages.length; i++) {
            policyPages[i].performFinish(policies);
        }
View Full Code Here

Examples of com.volantis.mcs.policies.PolicyBuilder

                project.getPolicySource();

        PolicyBuilderAccessor accessor = source.getPolicyBuilderAccessor();

        try {
            PolicyBuilder policyBuilder = accessor.retrievePolicyBuilder(
                    repositoryConnection.getUnderLyingConnection(),
                    repository.getDefaultProject(),
                    name);
   
            if(policyBuilder!=null && isNegativeTest) {
                fail("Component " + name + " exists when it should not.");
            } else if(!isNegativeTest) {
                assertEquals(name, policyBuilder.getName());
            }
        } catch(RepositoryException e) {
            assertTrue("Component " + name + " does not exist when " +
                       "it should", !isNegativeTest);
            if(!isNegativeTest) {
View Full Code Here

Examples of com.volantis.mcs.policies.PolicyBuilder

                            " is not the global project " + global);
                }
            }

            // Get the builder from the response, again may be null.
            PolicyBuilder policyBuilder = response.getBuilder();
            if (policyBuilder == null) {
                // No response from builder so try next one.
                continue;
            }
View Full Code Here

Examples of com.volantis.mcs.policies.PolicyBuilder

            throws RepositoryException {

        MarinerPageContext pageContext
                = ContextInternals.getMarinerPageContext(mrc);

        PolicyBuilder policyBuilder =
                converter.oldContainer2NewPolicyBuilder(container);

        IMDPolicyFetcher fetcher = pageContext.getPagePolicyFetcher();
        fetcher.addInlinePolicyBuilder(policyBuilder);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.