Search in sources :

Example 1 with TransportGuaranteeType

use of org.jboss.metadata.web.spec.TransportGuaranteeType in project wildfly by wildfly.

the class WebMetaDataHelper method newUserDataConstraint.

/**
     * Creates new user constraint meta data and associates it with security constraint meta data.
     *
     * @param transportGuarantee transport guarantee value
     * @param securityConstraintMD security constraint meta data
     * @return new user data constraint meta data
     */
public static UserDataConstraintMetaData newUserDataConstraint(final String transportGuarantee, final SecurityConstraintMetaData securityConstraintMD) {
    final UserDataConstraintMetaData userDataConstraintMD = new UserDataConstraintMetaData();
    final TransportGuaranteeType transportGuaranteeValue = TransportGuaranteeType.valueOf(transportGuarantee);
    userDataConstraintMD.setTransportGuarantee(transportGuaranteeValue);
    securityConstraintMD.setUserDataConstraint(userDataConstraintMD);
    return userDataConstraintMD;
}
Also used : UserDataConstraintMetaData(org.jboss.metadata.web.spec.UserDataConstraintMetaData) TransportGuaranteeType(org.jboss.metadata.web.spec.TransportGuaranteeType)

Aggregations

TransportGuaranteeType (org.jboss.metadata.web.spec.TransportGuaranteeType)1 UserDataConstraintMetaData (org.jboss.metadata.web.spec.UserDataConstraintMetaData)1