Examples of ImmutableMetaDataValue


Examples of com.volantis.shared.metadata.value.immutable.ImmutableMetaDataValue

    }

    public void testSetRetrievalWithStruct() throws Exception {
         // key3/set[0]/keyX/b-string
        //            /keyY/c-string
        ImmutableMetaDataValue value =
                createService().getCharacteristic("/key3[0]/keyX");
        assertImmutableStringValue(value,"b-string");

        value = createService().getCharacteristic("/key3[0]/keyY");
        assertImmutableStringValue(value,"c-string");
View Full Code Here

Examples of com.volantis.shared.metadata.value.immutable.ImmutableMetaDataValue



    public void testSetRetrievalWithBool() throws Exception {
        //     /key3/set[1]/true
        ImmutableMetaDataValue value =
                createService().getCharacteristic("/key3[1]");
        assertImmutableBooleanValue(value, true);
    }
View Full Code Here

Examples of com.volantis.shared.metadata.value.immutable.ImmutableMetaDataValue

        assertImmutableBooleanValue(value, true);
    }

    public void testSetRetrievalWitgStr() throws Exception {
        //     /key3/set[2]/x-string
        ImmutableMetaDataValue value =
                createService().getCharacteristic("/key3[2]");
        assertImmutableStringValue(value, "x-string");


    }
View Full Code Here

Examples of com.volantis.shared.metadata.value.immutable.ImmutableMetaDataValue

    // javadoc inherited
    public String getTransform() {
        String transform = null;
        try {
            ImmutableMetaDataValue value
                    = getCharacteristic(DEFAULT_XSLT);
            transform = value.getAsString();
            // todo as optional we need to check for empty string and
            // make null. The PMSS server will be fixed to convert empty
            // strings to null to avoid client pain
            if (transform != null && transform.trim().length() == 0) {
                transform = null;
View Full Code Here

Examples of com.volantis.shared.metadata.value.immutable.ImmutableMetaDataValue

    // javadoc inherited
    public String getRemoteTarget() {
        String remoteTarget = null;
        try {
            ImmutableMetaDataValue value =
                    getCharacteristic(REMOTE_TARGET_PREFIX);
            remoteTarget = value.getAsString();
        } catch (CharacteristicNotAvailableException e) {
            // this is not an optional characteristic. We shall log an error
            // and return null
            logger.error("service-def-path-failure",
                         new String[] {REMOTE_TARGET_PREFIX, getName()});
View Full Code Here

Examples of com.volantis.shared.metadata.value.immutable.ImmutableMetaDataValue

    public void testWhenCharacteristicIsStr() throws Exception {
        // add a policy/policy value pair to the request
        String charateristic = "string";
        MutableStringValue value = META_DATA_VALUE_FACTORY.createStringValue();
        value.setValue("a_string");
        ImmutableMetaDataValue stringVal = (ImmutableMetaDataValue)
                                              value.createImmutable();

        serviceDefMock.expects.getCharacteristic(charateristic).returns(stringVal);

        // invoke the function
View Full Code Here

Examples of com.volantis.shared.metadata.value.immutable.ImmutableMetaDataValue

    public void testWhenCharacteristicIsBool() throws Exception {
        // add a policy/policy value pair to the request
        String charateristic = "bool";
        MutableBooleanValue value = META_DATA_VALUE_FACTORY.createBooleanValue();
        value.setValue(Boolean.FALSE);
        ImmutableMetaDataValue boolVal = (ImmutableMetaDataValue)
                                              value.createImmutable();

        serviceDefMock.expects.getCharacteristic(charateristic).returns(boolVal);

        // invoke the function
View Full Code Here

Examples of com.volantis.shared.metadata.value.immutable.ImmutableMetaDataValue

    public void testWhenCharacteristicIsNumber() throws Exception {
        // add a policy/policy value pair to the request
        String charateristic = "num";
        MutableNumberValue value = META_DATA_VALUE_FACTORY.createNumberValue();
        value.setValue(new Double(11));
        ImmutableMetaDataValue numVal = (ImmutableMetaDataValue)
                                              value.createImmutable();

        serviceDefMock.expects.getCharacteristic(charateristic).returns(numVal);

        // invoke the function
View Full Code Here

Examples of com.volantis.shared.metadata.value.immutable.ImmutableMetaDataValue

        MutableListValue value = META_DATA_VALUE_FACTORY.createListValue();
        List list = value.getContentsAsMutableList();
        MutableStringValue strVal = META_DATA_VALUE_FACTORY.createStringValue();
        strVal.setValue("str");
        list.add(strVal.createImmutable());
        ImmutableMetaDataValue listVal = (ImmutableMetaDataValue)
                                              value.createImmutable();

        serviceDefMock.expects.getCharacteristic(charateristic).returns(listVal);

        // invoke the function
View Full Code Here

Examples of com.volantis.shared.metadata.value.immutable.ImmutableMetaDataValue

        MutableSetValue value = META_DATA_VALUE_FACTORY.createSetValue();
        Set set = value.getContentsAsMutableSet();
        MutableStringValue strVal = META_DATA_VALUE_FACTORY.createStringValue();
        strVal.setValue("str");
        set.add(strVal.createImmutable());
        ImmutableMetaDataValue setVal = (ImmutableMetaDataValue)
                                              value.createImmutable();

        serviceDefMock.expects.getCharacteristic(charateristic).returns(setVal);

        // invoke the function
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.