public static String getPid ( EvaluationCtx context ) { EvaluationResult attribute = context . getResourceAttribute ( STRING_ATTRIBUTE , Constants . OBJECT . PID . attributeId , null ) ; BagAttribute element = getAttributeFromEvaluationResult ( attribute ) ; if ( element == null ) { logger . debug ( "PolicyFinderModule:getPid exit on can't get pid on request callback" ) ; return null ; } if ( ! ( element . getType ( ) . equals ( STRING_ATTRIBUTE ) ) ) { logger . debug ( "PolicyFinderModule:getPid exit on couldn't get pid from xacml request non-string returned" ) ; return null ; } return ( element . size ( ) == 1 ) ? ( String ) element . getValue ( ) : null ; }
get the pid from the context or null if unable