public String getUserAutoRedirectURL(final Domain dom) {
   return dom.getSilverpeasServerURL()
       + getApplicationURL()
       + "/autoRedirect.jsp?domainId="
       + dom.getId()
       + "&goto=";
 }
 /**
  * Gets the users which the value of the extra property name matches the given ones.
  *
  * @param propertyName the name of the aimed extra property.
  * @param propertyValue the value the property must verify.
  * @return a list of user identifiers.
  * @throws AdminException
  */
 private List<String> getUserIdsBySpecificProperty(String propertyName, String propertyValue)
     throws AdminException {
   List<String> userIds = new ArrayList<>();
   if (isSharedDomain) {
     // All users by extra information
     Domain[] domains = getAdminService().getAllDomains();
     for (Domain domain : domains) {
       userIds.addAll(getUserIdsBySpecificProperty(domain.getId(), propertyName, propertyValue));
     }
   } else {
     userIds = getUserIdsBySpecificProperty(group.getDomainId(), propertyName, propertyValue);
   }
   return userIds;
 }
 public String getUserAutoRedirectURL(final String userId, final String target) {
   String encodedTarget = URLUtil.encodeURL(target);
   try {
     final UserDetail ud = UserDetail.getById(userId);
     final Domain dom = ud.getDomain();
     String url;
     if (URLUtil.isPermalink(target)) {
       url = dom.getSilverpeasServerURL() + getApplicationURL() + target;
     } else {
       url = getUserAutoRedirectURL(dom) + encodedTarget;
     }
     return url;
   } catch (final Exception e) {
     SilverLogger.getLogger(this)
         .error(
             "Error while getting user auto redirect url {0} for user {1}",
             new String[] {target, userId}, e);
     return "ErrorGettingDomainServer" + encodedTarget;
   }
 }
 public String getUserAutoRedirectSilverpeasServerURL(final String userId) {
   final UserDetail ud = UserDetail.getById(userId);
   final Domain dom = ud.getDomain();
   String url = dom.getSilverpeasServerURL() + getApplicationURL();
   return url;
 }