/*=============================================================================*
* Copyright 2006 The Apache Software Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*=============================================================================*/
package org.apache.muse.ws.dm.muws.impl;
import org.apache.muse.ws.addressing.soap.SoapFault;
import org.apache.muse.ws.dm.muws.ManageabilityCapability;
import org.apache.muse.ws.dm.muws.ManageabilityCharacteristics;
import org.apache.muse.ws.dm.muws.MuwsConstants;
import org.apache.muse.ws.resource.WsResource;
import org.apache.muse.ws.resource.impl.AbstractWsResourceCapability;
/**
*
* AbstractManageabilityCapability is an extension of
* {@linkplain AbstractWsResourceCapability AbstractWsResourceCapability} that
* provides one additional initialization step: <b>if</b> the resource uses
* the {@linkplain ManageabilityCharacteristics ManageabilityCharacteristics}
* capability, then this capability's URI will be added to the
* muws1:ManageabilityCapability property.
*
* @author Dan Jemiolo (danj)
*
*/
public abstract class AbstractManageabilityCapability
extends AbstractWsResourceCapability implements ManageabilityCapability
{
public void initializeCompleted()
throws SoapFault
{
super.initializeCompleted();
//
// add the capability URI to the ManageabilityCharacteristics list
//
WsResource resource = getWsResource();
ManageabilityCharacteristics mc =
(ManageabilityCharacteristics)resource.getCapability(MuwsConstants.CHARACTERISTICS_URI);
if (mc != null)
mc.addManageabilityCapability(getCapabilityURI());
}
}