FileDocCategorySizeDatePackage
UserDataConstraintImpl.javaAPI DocGlassfish v2 API5195Fri May 04 22:31:24 BST 2007None

UserDataConstraintImpl

public class UserDataConstraintImpl extends Descriptor implements com.sun.enterprise.deployment.web.UserDataConstraint
I represent the information about how the web application's data should be protected.
author
Danny Coward

Fields Summary
public static final String
TRANSPORT_GUARANTEE_NONE
The transport is unspecified.
public static final String
TRANSPORT_GUARANTEE_INTEGRAL
HTTP.
public static final String
TRANSPORT_GUARANTEE_CONFIDENTIAL
HTTPS
public static final String
TRANSPORT_GUARANTEE_CLEAR
JACC Specific
private static final String[]
transportGuaranteeChoices
private String
transportGuarantee
private static com.sun.enterprise.util.LocalStringManagerImpl
localStrings
Constructors Summary
Methods Summary
public java.lang.StringgetTransportGuarantee()
Return my transport type.

	if (transportGuarantee == null) {
	   transportGuarantee = TRANSPORT_GUARANTEE_NONE;
	}
	return transportGuarantee;
    
public static final java.lang.String[]getTransportGuaranteeChoices()
Return a String array of my static transport types.


                 
         
	return  transportGuaranteeChoices;
    
public java.lang.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;
    
public voidprint(java.lang.StringBuffer toStringBuffer)
Returns a formatted String of my state.

	toStringBuffer.append("UserDataConstraint ");
	toStringBuffer.append(" description ").append(super.getDescription());
	toStringBuffer.append(" transportGuarantee ").append(getTransportGuarantee());
    
public voidsetTransportGuarantee(java.lang.String transportGuarantee)
Sets my transport type to the given value. Throws an illegal argument exception if the value is not allowed.

	if (this.isBoundsChecking()) {
	    if ( !UserDataConstraint.NONE_TRANSPORT.equals(transportGuarantee)
		&& !UserDataConstraint.INTEGRAL_TRANSPORT.equals(transportGuarantee)
		    && !UserDataConstraint.CONFIDENTIAL_TRANSPORT.equals(transportGuarantee)) {
		throw new IllegalArgumentException(localStrings.getLocalString(
									       "enterprise.deployment.exceptiontransportguarentee",
									       "{0} is not a valid transport guarantee", new Object[] {transportGuarantee}));  
	    }
	}
	this.transportGuarantee = transportGuarantee;