public String[] getUnacceptableTransportGuarantees(){ String acceptable = getTransportGuarantee(); if(acceptable.equals(TRANSPORT_GUARANTEE_NONE)) return (String[]) null; else if (acceptable.equals(TRANSPORT_GUARANTEE_INTEGRAL)){ String[] ret = new String[] {TRANSPORT_GUARANTEE_CLEAR, TRANSPORT_GUARANTEE_CONFIDENTIAL }; return ret; } else if (acceptable.equals(TRANSPORT_GUARANTEE_CONFIDENTIAL)){ String[] ret = new String[] {TRANSPORT_GUARANTEE_CLEAR, TRANSPORT_GUARANTEE_INTEGRAL }; return ret; } return (String[]) null; } /**
/** * Returns a formatted String of my state. */ public void print(StringBuffer toStringBuffer) { toStringBuffer.append("UserDataConstraint "); toStringBuffer.append(" description ").append(super.getDescription()); toStringBuffer.append(" transportGuarantee ").append(getTransportGuarantee()); } }
/** * write the descriptor class to a DOM tree and return it * * @param parent node in the DOM tree * @param node name for the root element of this xml fragment * @param the descriptor to write * @return the DOM tree top node */ public Node writeDescriptor(Node parent, String nodeName, UserDataConstraintImpl descriptor) { Node myNode = appendChild(parent, nodeName); writeLocalizedDescriptions(myNode, descriptor); appendTextChild(myNode, WebTagNames.TRANSPORT_GUARANTEE, descriptor.getTransportGuarantee()); return myNode; } }