public String getUniqueId ( boolean setAttr ) throws Exception { String uniqueName = null ; String uniqueId = null ; if ( entity . getIdentifier ( ) . isSet ( uniqueIdProp ) ) { uniqueId = ( String ) entity . getIdentifier ( ) . get ( uniqueIdProp ) ; return uniqueId ; } uniqueName = ( String ) entity . getIdentifier ( ) . get ( securityNameProp ) ; if ( ( uniqueId == null ) && ( uniqueName == null ) ) { throw new WIMApplicationException ( WIMMessageKey . REQUIRED_IDENTIFIERS_MISSING , Tr . formatMessage ( tc , WIMMessageKey . REQUIRED_IDENTIFIERS_MISSING ) ) ; } // Get the attribute value. If it's part of the DN we must strip it out. // ZZZZ uniqueName = stripRDN(uniqueName); uniqueId = getUniqueIdForEntity ( uniqueName ) ; if ( setAttr ) { // Set the attribute in the WIM entity. entity . getIdentifier ( ) . set ( uniqueIdProp , uniqueId ) ; } return uniqueId ; }
Returns the uniqueId of a user or a group .