Package com.volantis.mcs.dissection.links

Examples of com.volantis.mcs.dissection.links.ShardLinkGroupAttributes


                // Get the dissectable area identity.
                DissectableAreaIdentity identity
                    = getDissectableAreaIdentity(attributes);

                // Create a new attributes class.
                ShardLinkGroupAttributes attrs
                    = new ShardLinkGroupAttributes();

                // Initialise the attributes class.
                attrs.setDissectableArea(identity);

                annotation = attrs;
                type = DissectionElementTypes.getShardLinkGroupType();

            } else if (localName.equals(SHARD_LINK_CONDITIONAL)) {

                // Create a new attributes class.
                ShardLinkConditionalAttributes attrs
                    = new ShardLinkConditionalAttributes();

                // Initialise the attributes class.
                ShardLinkContentRule rule;
                String value = attributes.getValue("rule");
                if (value.equals("any")) {
                    rule = StandardContentRules.getAnyRule();
                } else if (value.equals("separator")) {
                    rule = StandardContentRules.getSeparatorRule();
                } else {
                    throw new IllegalArgumentException("Unknown rule: "
                                                       + value);
                }
                attrs.setContentRule(rule);

                annotation = attrs;
                type = DissectionElementTypes.getShardLinkConditionalType();

            } else {
View Full Code Here


    private ShardLinkMenu createShardLinkMenu(
            String paneName,
            String inclusionPath,
            Styles styles) {

        ShardLinkGroupAttributes groupAttrs = new ShardLinkGroupAttributes();
        groupAttrs.setDissectableArea(
                new DissectableAreaIdentity(inclusionPath, paneName));
        ShardLinkMenu menu = new ShardLinkMenu(
                createElementDetails(styles), groupAttrs);

        // Return the created menu for the shard links.
View Full Code Here

        element = new ElementMock("element", expectations);
        slElement = new ElementMock("slElement", expectations);
        document = new DocumentMock("document", expectations);
        text = new TextMock("text", expectations);
        slAttributes = new ShardLinkGroupAttributes();

        domFactoryMock = new DOMFactoryMock("domFactoryMock", expectations);
        domFactoryMock.expects.createElement().returns(element);
    }
View Full Code Here

        }

        public void visitShardLinkGroup(DissectableElement element)
            throws DissectionException {

            ShardLinkGroupAttributes attributes
                = (ShardLinkGroupAttributes) document.getAnnotation(element);

            // The shard link group must specify a DissectableAreaIdentity.
            DissectableAreaIdentity identity = attributes.getDissectableArea();
            DissectableArea area;
            if (identity == null) {
                throw new DissectionException(
                            exceptionLocalizer.format(
                                        "dissectable-area-id-not-specified"));
View Full Code Here

TOP

Related Classes of com.volantis.mcs.dissection.links.ShardLinkGroupAttributes

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.