View Javadoc

1   /* Copyright 2006 Acegi Technology Pty Limited
2    *
3    * Licensed under the Apache License, Version 2.0 (the "License");
4    * you may not use this file except in compliance with the License.
5    * You may obtain a copy of the License at
6    *
7    *     http://www.apache.org/licenses/LICENSE-2.0
8    *
9    * Unless required by applicable law or agreed to in writing, software
10   * distributed under the License is distributed on an "AS IS" BASIS,
11   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12   * See the License for the specific language governing permissions and
13   * limitations under the License.
14   */
15  
16  package org.acegisecurity.intercept.web;
17  
18  import java.util.ArrayList;
19  import java.util.List;
20  
21  import org.acegisecurity.ConfigAttribute;
22  
23  /**
24   * Configuration entry for {@link FilterInvocationDefinitionSource}, that holds
25   * the url to be protected and the {@link ConfigAttribute}s as {@link String}
26   * that apply to that url.
27   *
28   * @author <a href="mailto:carlos@apache.org">Carlos Sanchez</a>
29   * @version $Id: FilterInvocationDefinitionSourceMapping.java 1784 2007-02-24 21:00:24Z luke_t $
30   * @since 1.1
31   */
32  public class FilterInvocationDefinitionSourceMapping {
33  
34      private String url;
35  
36      private List configAttributes = new ArrayList();
37  
38      /**
39       * Url to be secured.
40       *
41       * @param url
42       */
43      public void setUrl(String url) {
44          this.url = url;
45      }
46  
47      /**
48       * Url to be secured.
49       *
50       * @return the url
51       */
52      public String getUrl() {
53          return url;
54      }
55  
56      /**
57       * 
58       * @param roles {@link List}&lt;{@link String}>
59       */
60      public void setConfigAttributes(List roles) {
61          this.configAttributes = roles;
62      }
63  
64      /**
65       *
66       * @return {@link List}&lt;{@link String}>
67       */
68      public List getConfigAttributes() {
69          return configAttributes;
70      }
71  
72      /**
73       * Add a {@link ConfigAttribute} as {@link String}
74       *
75       * @param configAttribute
76       */
77      public void addConfigAttribute(String configAttribute) {
78          configAttributes.add(configAttribute);
79      }
80  
81  }