FileDocCategorySizeDatePackage
WebServiceConfigImpl.javaAPI DocGlassfish v2 API7749Fri May 04 22:24:42 BST 2007com.sun.enterprise.admin.wsmgmt.config.impl

WebServiceConfigImpl

public class WebServiceConfigImpl extends Object implements com.sun.enterprise.admin.wsmgmt.config.spi.WebServiceConfig
This represents management configuration for a web service end point.

Fields Summary
String
name
String
monitoringLevel
boolean
jbiEnabled
int
maxHistorySize
com.sun.enterprise.config.serverbeans.TransformationRule[]
tRules
Constructors Summary
public WebServiceConfigImpl(String n, String level, int size, boolean jbi)

        name = n;
        monitoringLevel = level;
        maxHistorySize = size;
        jbiEnabled = jbi;
    
public WebServiceConfigImpl(com.sun.enterprise.config.serverbeans.WebServiceEndpoint wsEp)


        if (wsEp == null) {
            return;
        }

        name = wsEp.getName();
        monitoringLevel = wsEp.getMonitoring();
        maxHistorySize = Integer.parseInt(wsEp.getMaxHistorySize());
        jbiEnabled = wsEp.isJbiEnabled();
        tRules = wsEp.getTransformationRule();
    
Methods Summary
public java.lang.StringgetEndpointName()
Returns the relative name of the web service endpoint

return
the relative name of the web service endpoint

        StringTokenizer strTok = new StringTokenizer(name, "#");
        String relId = null;
        while (strTok.hasMoreElements()) {
            relId = (String) strTok.nextElement();
        }
        return relId;
    
public booleangetJbiEnabled()
Returns true, if this web service endpoint JBI enabled

return
true, if this web service endpoint JBI enabled

        return jbiEnabled;
    
public intgetMaxHistorySize()
Returns the max history size (size of stored monitoring stats)

return
the max history size (size of stored monitoring stats)

        return maxHistorySize;
    
public java.lang.StringgetMonitoringLevel()
Returns the monitoring level OFF, LOW or HIGH

return
the monitoring level OFF, LOW or HIGH

        return monitoringLevel;
    
public java.lang.StringgetName()
Returns the name of the web service endpoint

return
the name of the web service endpoint

        return name;
    
public com.sun.enterprise.admin.wsmgmt.config.spi.RegistryLocation[]getRegistryLocation()
Returns the registries where the web service end point artifacts are published.

return
the registries where the web service end point artifacts are published.

        return null;
    
public com.sun.enterprise.admin.wsmgmt.config.spi.TransformationRule[]getRequestTransformationRule()
Returns the transformation rules defined for this endpoint during request phase

return
the transformation rules defined for this endpoint

        if ( tRules != null) {
            List tList = new ArrayList();
            for (int index =0; index < tRules.length; index++) {
                String phase = tRules[index].getApplyTo();
                if ( (phase.equals(Constants.REQUEST) ) ||
                        (phase.equals(Constants.BOTH)) ) {
                   if ( tRules[index].isEnabled() == true) {
                       tList.add(new TransformationRuleImpl(tRules[index]));
                   }
               }
            }
            if ( tList.size() > 0 ) {
                TransformationRule[] transformRules = new
                        TransformationRuleImpl[tList.size()];
                return (TransformationRule[]) tList.toArray(transformRules);
            } else {
                return null;
            }
        } else {
            return null;
        }
    
public com.sun.enterprise.admin.wsmgmt.config.spi.TransformationRule[]getResponseTransformationRule()
Returns the transformation rules defined for this endpoint during response phase

return
the transformation rules defined for this endpoint

        if ( tRules != null) {
            List tList = new ArrayList();
            for (int index =0; index < tRules.length; index++) {
                String phase = tRules[index].getApplyTo();
                if ( (phase.equals(Constants.RESPONSE) ) ||
                        (phase.equals(Constants.BOTH)) ) {
                   if ( tRules[index].isEnabled() == true) {
                       tList.add(new TransformationRuleImpl(tRules[index]));
                   }
               }
            }
            if ( tList.size() > 0 ) {
                TransformationRule[] transformRules = new
                        TransformationRuleImpl[tList.size()];
                return (TransformationRule[]) tList.toArray(transformRules);
            } else {
                return null;
            }
        } else {
            return null;
        }
    
public com.sun.enterprise.admin.wsmgmt.config.spi.TransformationRule[]getTransformationRule()
Returns the transformation rules defined for this endpoint

return
the transformation rules defined for this endpoint

        if ( tRules != null) {
            TransformationRule[] transformRules = new
                        TransformationRuleImpl[tRules.length];
            for (int index =0; index < tRules.length; index++) {
               transformRules[index]= new TransformationRuleImpl(tRules[index]);
            }
            return transformRules;
        } else {
            return null;
        }