/**
  * A windows principal.
  *
  * @param windowsIdentity Windows identity.
  * @param principalFormat Principal format.
  * @param roleFormat Role format.
  */
 public WindowsPrincipal(
     IWindowsIdentity windowsIdentity,
     PrincipalFormat principalFormat,
     PrincipalFormat roleFormat) {
   _identity = windowsIdentity;
   _fqn = windowsIdentity.getFqn();
   _sid = windowsIdentity.getSid();
   _sidString = windowsIdentity.getSidString();
   _groups = getGroups(windowsIdentity.getGroups());
   _roles = getRoles(windowsIdentity, principalFormat, roleFormat);
 }
 /**
  * A windows principal.
  *
  * @param windowsIdentity Windows identity.
  * @param realm Authentication realm.
  * @param principalFormat Principal format.
  * @param roleFormat Role format.
  */
 public GenericWindowsPrincipal(
     IWindowsIdentity windowsIdentity,
     Realm realm,
     PrincipalFormat principalFormat,
     PrincipalFormat roleFormat) {
   super(
       realm,
       windowsIdentity.getFqn(),
       "",
       getRoles(windowsIdentity, principalFormat, roleFormat));
   _sid = windowsIdentity.getSid();
   _sidString = windowsIdentity.getSidString();
   _groups = getGroups(windowsIdentity.getGroups());
 }