Methods Summary |
---|
public synchronized boolean | addOwner(java.security.Principal principal, java.security.Principal principal1)
if(!isOwner(principal))
{
throw new NotOwnerException();
} else {
if (ownerGroup.isMember(principal1)) return false;
if (!ownerGroup.isMember(principal1)) {
ownerGroup.addMember(principal1);
return true;
}
}
return false;
|
public synchronized boolean | deleteOwner(java.security.Principal principal, java.security.Principal principal1)
if(!isOwner(principal)) throw new NotOwnerException();
Enumeration enumeration = ownerGroup.members();
Object obj = enumeration.nextElement();
if(enumeration.hasMoreElements()) {
return ownerGroup.removeMember(principal1);
} else {
throw new LastOwnerException();
}
|
public synchronized boolean | isOwner(java.security.Principal principal)
return ownerGroup.isMember(principal);
|