Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/obinary/cms/beans/Permission.java


1   /**
2    *
3    * Magnolia and its source-code is licensed under the LGPL.
4    * You may copy, adapt, and redistribute this file for commercial or non-commercial use.
5    * When copying, adapting, or redistributing this document in keeping with the guidelines above,
6    * you are required to provide proper attribution to obinary.
7    * If you reproduce or distribute the document without making any substantive modifications to its content,
8    * please use the following attribution line:
9    *
10   * Copyright 1993-2003 obinary Ltd. (http://www.obinary.com) All rights reserved.
11   *
12   * */
13  
14  
15  
16  
17  package com.obinary.cms.beans;
18  
19  
20  import java.util.regex.Pattern;
21  
22  
23  /**
24   * User: sameercharles
25   * Date: Aug 14, 2003
26   * Time: 2:27:08 PM
27   * @author Sameer Charles
28   * @version 1.0
29   */
30  
31  
32  
33  public class Permission {
34  
35  
36      private Pattern pattern;
37      private long permissions;
38  
39  
40  
41      public void setPattern(Pattern value) {
42          this.pattern = value;
43      }
44  
45  
46      public Pattern getPattern() {
47          return this.pattern;
48      }
49  
50  
51      public void setPermissions(long value) {
52          this.permissions = value;
53      }
54  
55  
56      public long getPermissions() {
57          return this.permissions;
58      }
59  
60  
61      public boolean match(String path) {
62          return this.pattern.matcher(path).matches();
63      }
64  
65  }