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

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


                            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


            group = new AssetGroup();
            group.setProject(baseURL.getActualProject());
            group.setName(assetGroupName);
            group.setPrefixURL(baseURL.getBaseURL());

            final BaseLocation baseLocation = baseURL.getBaseLocation();
            if (baseLocation == BaseLocation.DEVICE) {
                group.setLocationType(AssetGroup.ON_DEVICE);
            } else if (baseLocation == BaseLocation.CONTEXT) {
                group.setLocationType(AssetGroup.CONTEXT);
            } else if (baseLocation == BaseLocation.HOST) {
View Full Code Here

        Variant variant = selected.getVariant();
        Content content = variant.getContent();
        if (content instanceof BaseURLRelative) {
            BaseURLRelative relative = (BaseURLRelative) content;
            BaseLocation baseLocation = relative.getBaseLocation();
            if (baseLocation != BaseLocation.DEFAULT) {
                return baseLocation;
            }

            RuntimePolicyReference reference = (RuntimePolicyReference)
View Full Code Here

        PolicyFactory factory = PolicyFactory.getDefaultInstance();
        BaseURLPolicyBuilder builder = factory.createBaseURLPolicyBuilder();
        builder.setName(attrs.getName());

        String locationTypeAsString = attrs.getLocationType();
        BaseLocation baseLocation = getBaseLocation(locationTypeAsString);
        builder.setBaseLocation(baseLocation);
        builder.setBaseURL(attrs.getPrefixURL());

        // Add it to the map.
        IMDPolicyFetcher fetcher = pageContext.getPagePolicyFetcher();
View Full Code Here

     * @param locationTypeAsString The location type as a string.
     * @return The  {@link BaseLocation}.
     * @throws IllegalArgumentException If the location type was not valid.
     */
    private BaseLocation getBaseLocation(String locationTypeAsString) {
        BaseLocation baseLocation;
        int locationType = Integer.parseInt(locationTypeAsString);
        switch (locationType) {
            case AssetGroup.CONTEXT:
                baseLocation = BaseLocation.CONTEXT;
                break;
View Full Code Here

        url = resolver.rewriteURLWithPageURLRewriter(url, PageURLType.IMAGE);

        ImageAttributes imageAttributes = new ImageAttributes();

        BaseLocation location = resolver.getBaseLocation(selectedVariant);
        imageAttributes.setLocalSrc(location == BaseLocation.DEVICE);

        Variant variant = selectedVariant.getVariant();
        ImageMetaData image = (ImageMetaData) variant.getMetaData();
        // Make a note of whether this image is a convertible
View Full Code Here

        if (content instanceof URLContent) {
            URLContent urlContent = (URLContent) variant.getContent();
            setAssetGroupName(asset, urlContent);
            asset.setValue(urlContent.getURL());

            BaseLocation baseLocation = urlContent.getBaseLocation();
            if (baseLocation == BaseLocation.DEVICE) {
                makeDeviceLocal(asset);
            }

        } else if (content instanceof AutoURLSequence) {
View Full Code Here

TOP

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

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.