Package org.apache.muse.ws.resource.properties

Examples of org.apache.muse.ws.resource.properties.ResourcePropertyCollection


        //
        // for every property in the resource's ws-rp doc, create a property
        // change listener that will send out notifications for each change
        //
        WsResource resource = getWsResource();
        ResourcePropertyCollection props = resource.getPropertyCollection();
        Iterator i = props.getPropertyNames().iterator();
       
        while (i.hasNext())
        {
            QName name = (QName)i.next();
           
            addTopic(name);
            _allTopicNames.add(name);
           
            PropertyChangeListener listener = factory.newInstance(name, resource);
            props.addChangeListener(listener);
        }
       
        //
        // if the resource supports either WS-RL capability, add support
        // for the WS-RL termination topic
View Full Code Here


        // evaluate the xpath over the resource's current ws-rp doc - if the
        // result is 'true', we publish the message
        //
        try
        {
            ResourcePropertyCollection props = _resource.getPropertyCollection();
            Element wsrpDoc = props.getResourcePropertyDocument();
            return XPathUtils.isMatch(wsrpDoc, _expression);
        }
       
        catch (Throwable error)
        {
View Full Code Here

        // in this case, we have to determine if there IS a property
        // and it's null, or there is no property
        //
        if (value == null)
        {
            ResourcePropertyCollection props = getWsResource().getPropertyCollection();
           
            //
            // property is nillable - we say it exists. not 100% accurate,
            // but as close as we're going to get
            //
            if (props.getSchema().isNillable(name))
                return new Element[]{ XmlUtils.createElement(name) };
           
            //
            // not nillable - must not exist
            //
View Full Code Here

       
        //
        // tell WSRP container about us - all read/write requests for
        // our properties will now be sent to us
        //
        ResourcePropertyCollection props = getWsResource().getPropertyCollection();
        props.addCapability(this);
    }
View Full Code Here

        //
        // for every property in the resource's ws-rp doc, create a property
        // change listener that will send out notifications for each change
        //
        WsResource resource = getWsResource();
        ResourcePropertyCollection props = resource.getPropertyCollection();
        Iterator i = props.getPropertyNames().iterator();
       
        while (i.hasNext())
        {
            QName name = (QName)i.next();
           
            addTopic(name);
           
            PropertyChangeListener listener = factory.newInstance(name, resource);
            props.addChangeListener(listener);
        }       

        //
        // if the resource supports either WS-RL capability, add support
        // for the WS-RL termination topic
        //
        if (resource.hasCapability(WsrlConstants.IMMEDIATE_TERMINATION_URI) ||
            resource.hasCapability(WsrlConstants.SCHEDULED_TERMINATION_URI))
            addTopic(WsrlConstants.TERMINATION_TOPIC_QNAME);
               
        //
        // read all of the wsnt:TopicExpression values from the RMD doc
        // and make sure we create Topic objects for them
        //
        MetadataDescriptor rmd = props.getMetadata();
       
        if (rmd.hasProperty(WsnConstants.TOPIC_EXPRESSION_QNAME))
        {
            Collection[] values = new Collection[2];
            values[0] = rmd.getInitialValues(WsnConstants.TOPIC_EXPRESSION_QNAME);
View Full Code Here

            throw new NullPointerException(_MESSAGES.get("NullRemoteResource"));
       
        QName qname = getPropertyQName();
       
        Element[] here = null;
        ResourcePropertyCollection props = getWsResource().getPropertyCollection();
        here = props.getResourceProperty(qname);
       
        WsResourceClient otherResource = new WsResourceClient(epr);
        Element[] there = otherResource.getResourceProperty(qname);
       
        //
View Full Code Here

        _resource = resource;
       
        //
        // get the metadata for the metric
        //
        ResourcePropertyCollection props = _resource.getPropertyCollection();
        MetadataDescriptor metadata = props.getMetadata();

        if (!metadata.isReadOnlyExternal(name))
        {
            Object[] filler = { name };
            throw new RuntimeException(_MESSAGES.get("NotReadOnly", filler));
View Full Code Here

        //
        // this call will eventually result in a listener calling the
        // update() method below - we will then overwrite the values
        // of the date attributes
        //
        ResourcePropertyCollection props = getWsResource().getPropertyCollection();
        props.updateResourceProperty(getName(), new Object[]{ value });
       
        _resetAt = new Date();
        _lastUpdated = null;
        _hasBeenReset = true;
    }
View Full Code Here

            throw new NullPointerException(_MESSAGES.get("NullQuery"));
       
        //
        // get a copy of the whole ws-rp doc that we can evaluate against
        //
        ResourcePropertyCollection props = getWsResource().getPropertyCollection();
        Element wsrpDoc = props.getResourcePropertyDocument();
       
        QueryExpressionFactory factory = getQueryExpressionFactory();
        QueryExpression evaluator = factory.newInstance(dialect);
       
        return evaluator.evaluate(wsrpDoc, query);
View Full Code Here

        // evaluate the xpath over the resource's current ws-rp doc - if the
        // result is 'true', we publish the message
        //
        try
        {
            ResourcePropertyCollection props = _resource.getPropertyCollection();
            Element wsrpDoc = props.getResourcePropertyDocument();
            return XPathUtils.isMatch(wsrpDoc, _expression);
        }
       
        catch (Throwable error)
        {
View Full Code Here

TOP

Related Classes of org.apache.muse.ws.resource.properties.ResourcePropertyCollection

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.