Package com.volantis.mcs.policies.variants.content

Examples of com.volantis.mcs.policies.variants.content.URLContentBuilder


            } else if (providesLayout) {
                updateLayoutModel();
            } else if (providesTheme) {
                updateThemeModel();
            } else if (providesURL) {
                URLContentBuilder urlContent =
                        POLICY_FACTORY.createURLContentBuilder();
                urlContent.setURL(urlText.getText());

                String baseUrlString = baseURLText.getText();
                if (baseUrlString != null && baseUrlString.length() > 0) {
                    PolicyReference baseURL =
                            POLICY_FACTORY.createPolicyReference(
                                    baseUrlString, PolicyType.BASE_URL);
                    urlContent.setBaseURLPolicyReference(baseURL);
                }

                BaseLocation baseLocation =
                    (BaseLocation)composite.getProperty(PolicyModel.BASE_LOCATION);
                urlContent.setBaseLocation(baseLocation);

                setModelContent(urlContent);

            }
View Full Code Here


        }

        File root = new File(folderSelector.getText().getText());
        if (root.getPath().length() < file.getPath().length()) {
            String url = file.getPath().substring(root.getPath().length());
            URLContentBuilder content = POLICY_FACTORY.createURLContentBuilder();
            content.setURL(url);
            variant.setContentBuilder(content);
        }

        variant.setMetaDataBuilder(metaData);
        return variant;
View Full Code Here

        variantBuilder.setSelectionBuilder(targeted);

        ImageMetaDataBuilder image = createImageMetaData(imageFile);
        variantBuilder.setMetaDataBuilder(image);

        URLContentBuilder content = createURLContent(assetGroup, imageFile);
        variantBuilder.setContentBuilder(content);

        return variantBuilder;
    }
View Full Code Here

        return variantBuilder;
    }

    private URLContentBuilder createURLContent(String assetGroup, File imageFile) {
        URLContentBuilder content = factory.createURLContentBuilder();
        if (assetGroup != null) {
            PolicyReference reference = factory.createPolicyReference(
                    assetGroup, PolicyType.BASE_URL);
            content.setBaseURLPolicyReference(reference);
        }
        content.setURL(imageFile.getName());
        return content;
    }
View Full Code Here

        variantBuilder.setSelectionBuilder(generic);

        ImageMetaDataBuilder image = createImageMetaData(imageFile);
        variantBuilder.setMetaDataBuilder(image);

        URLContentBuilder content = createURLContent(assetGroup, imageFile);
        variantBuilder.setContentBuilder(content);

        return variantBuilder;

    }
View Full Code Here

        ImageMetaDataBuilder image = createImageMetaData(imageFile);
        image.setConversionMode(ImageConversionMode.ALWAYS_CONVERT);
        variantBuilder.setMetaDataBuilder(image);

        URLContentBuilder content = createURLContent(assetGroup, imageFile);
        variantBuilder.setContentBuilder(content);

        return variantBuilder;
    }
View Full Code Here

        for (Iterator i = variantBuilders.iterator(); i.hasNext();) {
            VariantBuilder builder = (VariantBuilder) i.next();
            ContentBuilder contentBuilder = builder.getContentBuilder();

            if (contentBuilder instanceof URLContentBuilder) {
                URLContentBuilder urlContentBuilder =
                        (URLContentBuilder) contentBuilder;
                PolicyReference reference =
                        urlContentBuilder.getBaseURLPolicyReference();
                if (reference != null) {
                    reference = activateReference(logicalProject, baseURL,
                            reference);
                    urlContentBuilder.setBaseURLPolicyReference(reference);
                }
            }
        }

        // Convert the builder back into a policy. This will trigger another
View Full Code Here

        TextMetaDataBuilder builder = POLICY_FACTORY.
                createTextMetaDataBuilder();
        builder.setTextEncoding(TextEncoding.PLAIN);
       

        URLContentBuilder urlContentBuilder = POLICY_FACTORY
                .createURLContentBuilder();
        urlContentBuilder.setURL("/text.txt");
        variantBuilder.setContentBuilder(urlContentBuilder);

        variantBuilder.setMetaDataBuilder(builder);

        Variant variant = variantBuilder.getVariant();
View Full Code Here

        builder.setWidth(100);
        builder.setHeight(200);
        builder.setImageEncoding(ImageEncoding.JPEG);
        builder.setPixelDepth(24);

        URLContentBuilder urlContentBuilder = POLICY_FACTORY
                .createURLContentBuilder();
        urlContentBuilder.setURL("/foo.jpeg");
        variantBuilder.setContentBuilder(urlContentBuilder);

        variantBuilder.setMetaDataBuilder(builder);

        Variant variant = variantBuilder.getVariant();
View Full Code Here

        AudioMetaDataBuilder builder = POLICY_FACTORY
                .createAudioMetaDataBuilder();

        builder.setAudioEncoding(AudioEncoding.MP3);

        URLContentBuilder urlContentBuilder = POLICY_FACTORY
                .createURLContentBuilder();
        urlContentBuilder.setURL("/foo.mp3");
        variantBuilder.setContentBuilder(urlContentBuilder);

        variantBuilder.setMetaDataBuilder(builder);

        Variant variant = variantBuilder.getVariant();
View Full Code Here

TOP

Related Classes of com.volantis.mcs.policies.variants.content.URLContentBuilder

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.