public void assignService(String universalId,String serviceName,Map values) throws AMConsoleException {
  try {
    String[] params={universalId,serviceName};
    logEvent("ATTEMPT_IDENTITY_ASSIGN_SERVICE",params);
    AMIdentity amid=IdUtils.getIdentity(getUserSSOToken(),universalId);
    amid.assignService(serviceName,values);
    logEvent("SUCCEED_IDENTITY_ASSIGN_SERVICE",params);
  }
 catch (  SSOException e) {
    String[] paramsEx={universalId,serviceName,getErrorString(e)};
    logEvent("SSO_EXCEPTION_IDENTITY_ASSIGN_SERVICE",paramsEx);
    debug.warning("EntitiesModelImpl.assignService",e);
    throw new AMConsoleException(getErrorString(e));
  }
catch (  IdRepoException e) {
    debug.error("EntitiesModelImpl.assignService",e);
    String[] paramsEx={universalId,serviceName,getErrorString(e)};
    logEvent("IDM_EXCEPTION_IDENTITY_ASSIGN_SERVICE",paramsEx);
    debug.warning("EntitiesModelImpl.assignService",e);
    throw new AMConsoleException(getErrorString(e));
  }
}

public void assignService ( String universalId , String serviceName , Map values ) throws AMConsoleException { try { String [ ] params = { universalId , serviceName } ; logEvent ( "ATTEMPT_IDENTITY_ASSIGN_SERVICE" , params ) ; AMIdentity amid = IdUtils . getIdentity ( getUserSSOToken ( ) , universalId ) ; amid . assignService ( serviceName , values ) ; logEvent ( "SUCCEED_IDENTITY_ASSIGN_SERVICE" , params ) ; } catch ( SSOException e ) { String [ ] paramsEx = { universalId , serviceName , getErrorString ( e ) } ; logEvent ( "SSO_EXCEPTION_IDENTITY_ASSIGN_SERVICE" , paramsEx ) ; debug . warning ( "EntitiesModelImpl.assignService" , e ) ; throw new AMConsoleException ( getErrorString ( e ) ) ; } catch ( IdRepoException e ) { debug . error ( "EntitiesModelImpl.assignService" , e ) ; String [ ] paramsEx = { universalId , serviceName , getErrorString ( e ) } ; logEvent ( "IDM_EXCEPTION_IDENTITY_ASSIGN_SERVICE" , paramsEx ) ; debug . warning ( "EntitiesModelImpl.assignService" , e ) ; throw new AMConsoleException ( getErrorString ( e ) ) ; } }
assigns service to an entity .
