Package com.volantis.mcs.runtime.policies

Examples of com.volantis.mcs.runtime.policies.PolicyReferenceFactory


    }

    private RuntimePolicyReference createPolicyReference(
            RepositoryObjectIdentity identity, PolicyType policyType) {

        PolicyReferenceFactory factory =
                pageContext.getPolicyReferenceFactory();
        return factory.createLazyNormalizedReference(
                (RuntimeProject) identity.getProject(),
                pageContext.getBaseURL(), identity.getName(), policyType);
    }
View Full Code Here


                pageContext.getBaseURL(), identity.getName(), policyType);
    }

    private RuntimePolicyReference createPolicyReference(
            String name, PolicyType policyType) {
        PolicyReferenceFactory factory =
                pageContext.getPolicyReferenceFactory();
        return factory.createLazyNormalizedReference(
                pageContext.getCurrentProject(),
                pageContext.getBaseURL(), name, policyType);
    }
View Full Code Here

    private RuntimePolicyReference createPolicyReference(PolicyReference reference) {
        RuntimePolicyReference runtimePolicyReference;
        if (reference instanceof RuntimePolicyReference) {
            runtimePolicyReference = (RuntimePolicyReference) reference;
        } else {
            PolicyReferenceFactory factory =
                    pageContext.getPolicyReferenceFactory();

            return factory.createLazyNormalizedReference(
                    pageContext.getCurrentProject(),
                    pageContext.getBaseURL(),
                    reference.getName(),
                    reference.getExpectedPolicyType());
        }
View Full Code Here

     * @parma pageContext
     */
    private static ScriptAssetReference loadAssetReference(String assetName,
           MarinerPageContext pageContext) throws MarinerContextException {
        loadProject(pageContext);
        final PolicyReferenceFactory factory = pageContext.getPolicyReferenceFactory();

        final RuntimePolicyReference reference = factory.createNormalizedReference(
                project, assetName, PolicyType.SCRIPT);
        return new DefaultComponentScriptAssetReference(
                reference, pageContext.getAssetResolver());

    }
View Full Code Here

     * @parma pageContext
     */
    private static ScriptAssetReference loadAssetReference(String assetName,
           MarinerPageContext pageContext) throws MarinerContextException {
        loadProject(pageContext);
        final PolicyReferenceFactory factory = pageContext.getPolicyReferenceFactory();
       
       
        final RuntimePolicyReference reference = factory.createNormalizedReference(
                project, assetName, PolicyType.SCRIPT);
        return new DefaultComponentScriptAssetReference(
                reference, pageContext.getAssetResolver());
  
    }
View Full Code Here

     */
    public static RuntimePolicyReference loadImageReference(String assetName,
           MarinerPageContext pageContext) throws MarinerContextException {
        loadProject(pageContext);

        final PolicyReferenceFactory factory = pageContext.getPolicyReferenceFactory();
       
        return factory.createNormalizedReference(
                project, assetName, PolicyType.IMAGE);
    }
View Full Code Here

        selectedVariantMock.expects.getOldObject()
                .returns(runtimeDeviceTheme).any();

        final ProjectManagerMock projectManagerMock =
                new ProjectManagerMock("projectManagerMock", expectations);
        PolicyReferenceFactory referenceFactory =
                new PolicyReferenceFactoryImpl(projectManagerMock);

        variantSelectionPolicyMock.fuzzy
                .retrieveBestObject(mockFactory.expectsAny(),
                        mockFactory.expectsAny(),
View Full Code Here

    private static ScriptAssetReference getScriptAssetReference(
            final String policyName, final MarinerPageContext pageContext) {

        final RuntimeProject project = pageContext.getCurrentProject();
        final MarinerURL baseURL = pageContext.getBaseURL();
        final PolicyReferenceFactory factory =
            pageContext.getPolicyReferenceFactory();
        final RuntimePolicyReference reference =
            factory.createLazyNormalizedReference(
                project, baseURL, policyName, PolicyType.SCRIPT);
        final ScriptAssetReference scriptAssetReference =
            new DefaultComponentScriptAssetReference(
                reference, pageContext.getAssetResolver());
        return scriptAssetReference.getScriptAsset() != null ?
View Full Code Here

        InternalLayoutContentBuilder layoutContent =
                policyFactory.createLayoutContentBuilder();
        layoutContent.setLayout(layout);

        PolicyReferenceFactory referenceFactory = createReferenceFactory();

        LayoutActivator layoutActivator = new LayoutActivator(referenceFactory);

        Content activatedContent = activateContent(layoutContent,
                layoutActivator, "policy.mlyt", PolicyType.LAYOUT,
View Full Code Here

        InternalThemeContentBuilder themeContent =
                policyFactory.createThemeContentBuilder();
        themeContent.setStyleSheet(styleSheet);

        PolicyReferenceFactory referenceFactory = createReferenceFactory();

        ThemeActivator themeActivator = new ThemeActivator(referenceFactory);

        // Get the activated variant.
        Content activatedContent = activateContent(themeContent, themeActivator,
View Full Code Here

TOP

Related Classes of com.volantis.mcs.runtime.policies.PolicyReferenceFactory

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.