Examples of PolicyType


Examples of com.volantis.mcs.policies.PolicyType

            } else if (PropertyValue.class == propertyType) {
                addStyleValue(descriptor, synchronizationGroup, false);
            } else if (Integer.class == propertyType || Integer.TYPE == propertyType) {
                addInteger(descriptor);
            } else if (PolicyReference.class == propertyType) {
                PolicyType policyType = null;
                if (policyTypes != null) {
                    policyType = (PolicyType) policyTypes.get(descriptor.getIdentifier());
                }
                addPolicyReference(descriptor, policyType);
            } else {
View Full Code Here

Examples of com.volantis.mcs.policies.PolicyType

    public void updateErrorStatus() {
        Proxy proxy = context.getInteractionModel();
        List diagnostics = (proxy == null) ? null : proxy.getDiagnostics();
        boolean hasErrors = diagnostics != null && !diagnostics.isEmpty();
        if (hasErrors) {
            final PolicyType policyType = ((PolicyEditorContext) context).getPolicyType();
            if (policyType == null) {
                throw new IllegalArgumentException("Policy type is NOT defined for this context");
            }
            // policyType is used as a key to get a message from bundle
            String policyTypeMessage = EditorMessages.getString(RESOURCE_PREFIX + policyType.toString());
            String errorFormat = EditorMessages.getString(RESOURCE_PREFIX + "errors");
            String errorMessage = MessageFormat.format(errorFormat, new Object[] {
                new Integer(diagnostics.size()),               
                new Integer(0),
                new Integer(0),
View Full Code Here

Examples of com.volantis.mcs.policies.PolicyType

            for (Iterator i = typeSpecificPartitions.iterator(); i.hasNext();) {
                PolicyTypePartitionConfiguration typePartition =
                        (PolicyTypePartitionConfiguration) i.next();
                List types = typePartition.getPolicyTypes();
                for (int j = 0; j < types.size(); j++) {
                    PolicyType policyType = (PolicyType) types.get(j);
                    type2Partition.put(policyType, typePartition);
                }
            }
        }
View Full Code Here

Examples of com.volantis.mcs.policies.PolicyType

     * @return An empty instance of the default metadata type for this policy,
     *         or null if one could not be created
     */
    private MetaDataBuilder getDefaultMetaDataBuilder() {
        MetaDataBuilder metaDataBuilder = null;
        PolicyType policyType = context.getPolicyType();
        if (policyType == VariablePolicyType.TEXT) {
            metaDataBuilder = POLICY_FACTORY.createTextMetaDataBuilder();
        } else if (policyType == VariablePolicyType.CHART) {
            metaDataBuilder = POLICY_FACTORY.createChartMetaDataBuilder();
        } else if (policyType == VariablePolicyType.AUDIO) {
View Full Code Here

Examples of com.volantis.mcs.policies.PolicyType

    protected Value createIdentityValue(
            ExpressionContext context, Project project, String policyName) {

        FileExtension extension =
                FileExtension.getFileExtensionForLocalPolicy(policyName);
        PolicyType policyType = null;
        if (extension != null) {
            policyType = extension.getPolicyType();

        }
        if (policyType == null) {
View Full Code Here

Examples of com.volantis.mcs.policies.PolicyType

            builder.setCacheControlDefaults(base.getDefaultCacheControl());

            SeparateCacheControlConstraintsMap constraintsMap =
                    new SeparateCacheControlConstraintsMap();
            for (Iterator i = PolicyType.getPolicyTypes().iterator(); i.hasNext();) {
                PolicyType policyType = (PolicyType) i.next();
                PolicyTypePartitionConfiguration typePartitionConfiguration =
                        partition.getTypePartition(policyType);
                CacheControlConstraints typeConstraints;
                groupBuilder = cacheFactory.createGroupBuilder();
                if (typePartitionConfiguration == null) {
View Full Code Here

Examples of com.volantis.mcs.policies.PolicyType

    // Javadoc inherited.
    public ActivatedPolicy fetchPolicy(RuntimePolicyReference reference) {

        RuntimeProject project = (RuntimeProject) reference.getProject();
        String name = reference.getName();
        PolicyType expectedPolicyType = reference.getExpectedPolicyType();

        ActivatedPolicy policy = null;
        try {
            // Look for the policy in the project.
            policy = retriever.retrievePolicy(project, name);

            // If a specific type was requested then make sure the one that was
            // retrieved matches it. If it does not just ignore it.
            if (policy != null) {
                PolicyType actualPolicyType = policy.getPolicyType();
                if (expectedPolicyType != null &&
                        actualPolicyType != expectedPolicyType) {

                    if (logger.isInfoEnabled()) {
                        logger.info("Expected " + expectedPolicyType +
View Full Code Here

Examples of com.volantis.mcs.policies.PolicyType

        // Create the branded name by prepending it to the project relative
        // name minus the leading /.
        String brandedName = brandName + projectRelativeName.substring(1);

        RuntimeProject project = (RuntimeProject) reference.getProject();
        PolicyType expectedPolicyType = reference.getExpectedPolicyType();
        if (remoteBrandName) {
            // The brand name is remote so we need to renormalize the
            // branded reference, as it could refer to another policy.
            reference = referenceFactory.createLazyNormalizedReference(
                    project, DUMMY, brandedName, expectedPolicyType);
View Full Code Here

Examples of com.volantis.mcs.policies.PolicyType

    private StyleValue activateStyleComponentURI(
            StyleProperty property, StyleComponentURI componentURI) {

        String expression = componentURI.getExpressionAsString();

        PolicyType expectedPolicyType;
        if (property == StylePropertyDetails.MCS_BACKGROUND_DYNAMIC_VISUAL) {
            expectedPolicyType = PolicyType.VIDEO;
        } else {
            expectedPolicyType = PolicyType.IMAGE;
        }
View Full Code Here

Examples of com.volantis.mcs.policies.PolicyType

                context, policy, requiredEncodings);

        if (selection == null) {

            // Try fallback.
            PolicyType policyType = policy.getPolicyType();
            RuntimePolicyReference fallbackReference = (RuntimePolicyReference)
                    policy.getAlternatePolicy(policyType);
            if (fallbackReference != null) {
                PolicyFetcher fetcher = context.getPolicyFetcher();
                policy = (ActivatedVariablePolicy)
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.