throws DeploymentException {
while (paramters.hasNext()) {
//this is to check whether some one has locked the parmter at the top level
OMElement paramterElement = (OMElement) paramters.next();
Parameter paramter = new ParameterImpl();
//setting paramterElement
paramter.setParameterElement(paramterElement);
//setting paramter Name
OMAttribute paraName = paramterElement.getAttribute(
new QName(ATTNAME));
if(paraName == null ){
throw new DeploymentException(
Messages.getMessage(DeploymentErrorMsgs.BAD_PARA_ARGU));
}
paramter.setName(paraName.getValue());
//setting paramter Value (the chiled elemnt of the paramter)
OMElement paraValue = paramterElement.getFirstElement();
if(paraValue !=null){
paramter.setValue(paramterElement);
paramter.setParamterType(Parameter.DOM_PARAMETER);
} else {
String paratestValue = paramterElement.getText();
paramter.setValue(paratestValue);
paramter.setParamterType(Parameter.TEXT_PARAMETER);
}
//setting locking attribute
OMAttribute paraLocked = paramterElement.getAttribute(
new QName(ATTLOCKED));
Parameter parentpara = null;
if (parent !=null) {
parentpara = parent.getParameter(paramter.getName());
}
if (paraLocked !=null) {
String lockedValue = paraLocked.getValue();
if("true".equals(lockedValue)){
//if the parameter is locked at some levle paramer value replace by that
if(parent!=null && parent.isParamterLocked(paramter.getName())){
throw new DeploymentException("The paramter " + paramter.getName() + " has" +
" locked at top levle can not overide");
} else{
paramter.setLocked(true);
}
} else {
paramter.setLocked(false);
}
}
try {
if(parent !=null){
if(parentpara == null | !parent.isParamterLocked(paramter.getName())){
parameterInclude.addParameter(paramter);
}
} else {
parameterInclude.addParameter(paramter);
}