Package com.volantis.mcs.objects

Examples of com.volantis.mcs.objects.PolicyIdentity


        // =====================================================================
        Function function = new PolicyFunction();

        doTestInvokeCreateIdentity(function, new Value[] {
            projectValueMock, componentValueMock
        }, new PolicyIdentity(AUDIO_COMPONENT_NAME, PolicyType.AUDIO));

    }
View Full Code Here


        Value value = function.invoke(expressionContextMock, arguments);

        RepositoryObjectIdentityValue identityValue =
                (RepositoryObjectIdentityValue) value;
        PolicyIdentity actualIdentity =
                identityValue.asPolicyIdentity();
        assertEquals("Identity", expectedIdentity, actualIdentity);
    }
View Full Code Here

            throw new IllegalArgumentException(
                    "Cannot determine policy type for " + policyName +
                    ", file extension is not recognized");
        }

        PolicyIdentity identity =
                new PolicyIdentity(project, policyName, policyType);

        return new RepositoryObjectIdentityValueImpl(
                context.getFactory(), identity);
    }
View Full Code Here

            Value value = expression.evaluate(expressionContext);
            if (value instanceof RepositoryObjectIdentityValue) {
                RepositoryObjectIdentityValue identityValue =
                        (RepositoryObjectIdentityValue) value;

                PolicyIdentity identity = identityValue.asPolicyIdentity();

                reference = referenceFactory.createLazyNormalizedReference(
                        (RuntimeProject) identity.getProject(), baseURL, identity.getName(),
                        identity.getPolicyType());

                if (brandName != null) {
                    reference = brander.getBrandedReference(reference,
                            brandName);
                }
View Full Code Here

        // =====================================================================
        Function function = new GetUnbrandedPolicyNameFunction();

        doTestInvokeCreateIdentity(function, new Value[] {
            valueMock
        }, new PolicyIdentity(projectMock, "^" + AUDIO_COMPONENT_NAME, PolicyType.AUDIO));
    }
View Full Code Here

    public RuntimePolicyReferenceExpression parsePolicyOrUnquotedExpression(
            String expressionAsString, PolicyType expectedPolicyType) {

        if (PolicyExpressionParserImpl.isPolicyName(expressionAsString)) {
            Project project = projectProvider.getCurrentProject();
            PolicyIdentity identity = new PolicyIdentity(project,
                    expressionAsString, expectedPolicyType);
            IdentityValueExpression valueExpression =
                    new IdentityValueExpression(identity);
            String brandName = getCurrentBrandName();
            return new RuntimePolicyReferenceExpression(project,
View Full Code Here

TOP

Related Classes of com.volantis.mcs.objects.PolicyIdentity

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.