Package java.security.acl

Examples of java.security.acl.AclEntry


        // PrincipalImpl() take the current host as entry
        owner = new PrincipalImpl();
        try {
            acl = new AclImpl(owner,Owner);
            AclEntry ownEntry = new AclEntryImpl(owner);
            ownEntry.addPermission(READ);
            ownEntry.addPermission(WRITE);
            acl.addEntry(owner,ownEntry);
        } catch (NotOwnerException ex) {
            if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
                SNMP_LOGGER.logp(Level.FINEST, SnmpAcl.class.getName(),
                    "SnmpAcl(String,String)",
View Full Code Here


    public void rereadTheFile() throws NotOwnerException, UnknownHostException {
        alwaysAuthorized = false;
        acl.removeAll(owner);
        trapDestList.clear();
        informDestList.clear();
        AclEntry ownEntry = new AclEntryImpl(owner);
        ownEntry.addPermission(READ);
        ownEntry.addPermission(WRITE);
        acl.addEntry(owner,ownEntry);
        readAuthorizedListFile();
    }
View Full Code Here

   */
  @Override
  public boolean checkPermission(Principal user,
                                 java.security.acl.Permission perm) {
        for (Enumeration<AclEntry> e = entryList.elements();e.hasMoreElements();){
          AclEntry ent = e.nextElement();
          if (ent.getPrincipal().equals(user))
                if (ent.checkPermission(perm)) return true;
        }
        return false;
  }
View Full Code Here

   * @see java.security.Principal
   */
  public Enumeration getPermissions(Principal user){
  Vector empty = new Vector();
  for (Enumeration e = entryList.elements();e.hasMoreElements();){
    AclEntry ent = (AclEntry) e.nextElement();
    if (ent.getPrincipal().equals(user))
    return ent.permissions();
  }
  return empty.elements();
  }
View Full Code Here

   * @see java.security.Permission
   */
  public boolean checkPermission(Principal user,
         java.security.acl.Permission perm) {
  for (Enumeration e = entryList.elements();e.hasMoreElements();){
    AclEntry ent = (AclEntry) e.nextElement();
    if (ent.getPrincipal().equals(user))
    if (ent.checkPermission(perm)) return true;
  }
  return false;
  }
View Full Code Here

       
        // PrincipalImpl() take the current host as entry
        owner = new PrincipalImpl();
        try {
            acl = new AclImpl(owner,Owner);
            AclEntry ownEntry = new AclEntryImpl(owner);
            ownEntry.addPermission(READ);
            ownEntry.addPermission(WRITE);
            acl.addEntry(owner,ownEntry);
        } catch (NotOwnerException ex) {
            if (isDebugOn()) {
                debug("constructor",
          "Should never get NotOwnerException as the owner"+
View Full Code Here

    public void rereadTheFile() throws NotOwnerException, UnknownHostException {
        alwaysAuthorized = false;
        acl.removeAll(owner);
        trapDestList.clear();
        informDestList.clear();
        AclEntry ownEntry = new AclEntryImpl(owner);
        ownEntry.addPermission(READ);
        ownEntry.addPermission(WRITE)
        acl.addEntry(owner,ownEntry);
        readAuthorizedListFile();
    }
View Full Code Here

   * @see java.security.Principal
   */
  public Enumeration<Permission> getPermissions(Principal user){
        Vector<Permission> empty = new Vector<Permission>();
        for (Enumeration<AclEntry> e = entryList.elements();e.hasMoreElements();){
          AclEntry ent = e.nextElement();
          if (ent.getPrincipal().equals(user))
                return ent.permissions();
        }
        return empty.elements();
  }
View Full Code Here

   * @see java.security.Permission
   */
  public boolean checkPermission(Principal user,
                                 java.security.acl.Permission perm) {
        for (Enumeration e = entryList.elements();e.hasMoreElements();){
          AclEntry ent = (AclEntry) e.nextElement();
          if (ent.getPrincipal().equals(user))
                if (ent.checkPermission(perm)) return true;
        }
        return false;
  }
View Full Code Here

        // PrincipalImpl() take the current host as entry
        owner = new PrincipalImpl();
        try {
            acl = new AclImpl(owner,Owner);
            AclEntry ownEntry = new AclEntryImpl(owner);
            ownEntry.addPermission(READ);
            ownEntry.addPermission(WRITE);
            acl.addEntry(owner,ownEntry);
        } catch (NotOwnerException ex) {
            if (SNMP_LOGGER.isLoggable(Level.FINEST)) {
                SNMP_LOGGER.logp(Level.FINEST, SnmpAcl.class.getName(),
                    "SnmpAcl(String,String)",
View Full Code Here

TOP

Related Classes of java.security.acl.AclEntry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.