net.sf.hermesftp.usermanager.model
Class PermissionData

java.lang.Object
  extended by net.sf.hermesftp.usermanager.model.PermissionData

public class PermissionData
extends java.lang.Object

Represents the permission on one or more file pathes. The paths a configured using ant style path naming conventions.

Author:
Lars Behnke

Constructor Summary
PermissionData()
           
 
Method Summary
 int getPermission()
          Getter method for the java bean permission.
 java.lang.String getTemplate()
          Getter method for the java bean template.
 boolean matches(java.lang.String checkPath, java.lang.String ftproot, java.lang.String username)
          Fills the placeholders in the path template and checks if the passed path matches the template.
 void setPermission(int permission)
          Setter method for the java bean permission.
 void setTemplate(java.lang.String template)
          Setter method for the java bean template.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PermissionData

public PermissionData()
Method Detail

getPermission

public int getPermission()
Getter method for the java bean permission.

Returns:
Returns the value of the java bean permission.

setPermission

public void setPermission(int permission)
Setter method for the java bean permission.

Parameters:
permission - The value of permission to set.

getTemplate

public java.lang.String getTemplate()
Getter method for the java bean template.

Returns:
Returns the value of the java bean template.

setTemplate

public void setTemplate(java.lang.String template)
Setter method for the java bean template.

Parameters:
template - The value of template to set.

matches

public boolean matches(java.lang.String checkPath,
                       java.lang.String ftproot,
                       java.lang.String username)
                throws FtpConfigException
Fills the placeholders in the path template and checks if the passed path matches the template.

Parameters:
checkPath - The path to check.
ftproot - The ftp root folder.
username - The username.
Returns:
True, if the path matches the configured pattern.
Throws:
FtpConfigException - Error on reading or processing a configuration file.


Copyright © 2005-2007 Lars Behnke. All Rights Reserved.