Package com.volantis.mcs.policies.variants.selection

Examples of com.volantis.mcs.policies.variants.selection.SelectionBuilder


     */
    public void performFinish(List variants) {
        Iterator it = variants.iterator();
        while (it.hasNext()) {
            VariantBuilder variant = (VariantBuilder) it.next();
            SelectionBuilder selection = variant.getSelectionBuilder();
            if (selection instanceof TargetedSelectionBuilder) {
                TargetedSelectionBuilder targeted = (TargetedSelectionBuilder) selection;
                List categoryReferences = targeted.getModifiableCategoryReferences();
                List deviceReferences = targeted.getModifiableDeviceReferences();

View Full Code Here


     */
    private SelectionBuilder getSelectionBuilder() {
        IStructuredSelection selection = (IStructuredSelection) criteriaList.getSelection();
        SelectionType type = (SelectionType) selection.getFirstElement();

        SelectionBuilder builder = null;
        if (SelectionType.DEFAULT == type) {
            builder = POLICY_FACTORY.createDefaultSelectionBuilder();
        } else if (SelectionType.ENCODING == type) {
            builder = POLICY_FACTORY.createEncodingSelectionBuilder();
        } else if (SelectionType.GENERIC_IMAGE == type) {
View Full Code Here

            } else {
                Proxy selection = ((BaseProxy)
                        newVariant.getPropertyProxy(PolicyModel.SELECTION))
                        .getConcreteProxy();

                SelectionBuilder builder = null;
                if (selection == null) {
                    composite.clear();
                } else {
                    builder = (SelectionBuilder) selection.getModelObject();
                    if (builder instanceof GenericImageSelectionBuilder) {
View Full Code Here

            if (selectionBase != null) {
                selectionProxy = selectionBase.getConcreteProxy();
                // If we have no concrete metadata, create an empty one of the
                // appropriate type
                if (selectionProxy == null) {
                    SelectionBuilder selection = getDefaultSelectionBuilder();
                    selectionBase.setModelObject(selection);

                    // Now that we've set a concrete model object, we should
                    // have a concrete proxy.
                    selectionProxy = selectionBase.getConcreteProxy();
View Full Code Here

     *
     * @return An empty instance of the default selection type for this policy,
     *         or null if one could not be created
     */
    private SelectionBuilder getDefaultSelectionBuilder() {
        SelectionBuilder selectionBuilder = null;
        selectionBuilder = POLICY_FACTORY.createTargetedSelectionBuilder();

        return selectionBuilder;
    }
View Full Code Here

     */
    private void addAssetSafely(VariablePolicyBuilder policyBuilder,
                        VariantBuilder variantBuilder) {

        // See if we have an old version of the variantBuilder.
        SelectionBuilder selectionBuilder =
                variantBuilder.getSelectionBuilder();
        List variants = policyBuilder.getVariantBuilders();
        for (int i = 0; i < variants.size(); i++) {
            VariantBuilder existing = (VariantBuilder) variants.get(i);
            if (existing.getSelectionBuilder().equals(selectionBuilder)) {
View Full Code Here

TOP

Related Classes of com.volantis.mcs.policies.variants.selection.SelectionBuilder

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.