2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
9 package org.opendaylight.controller.filtervalve.cors.jaxb;
11 import static com.google.common.base.Preconditions.checkArgument;
13 import javax.xml.bind.annotation.XmlElement;
14 import javax.xml.bind.annotation.XmlRootElement;
17 public class FilterMapping {
18 private String filterName;
19 private String urlPattern;
20 private boolean initialized;
22 @XmlElement(name = "filter-name")
23 public String getFilterName() {
27 public void setFilterName(String filterName) {
28 checkArgument(initialized == false, "Already initialized");
29 this.filterName = filterName;
32 @XmlElement(name = "url-pattern")
33 public String getUrlPattern() {
37 public void setUrlPattern(String urlPattern) {
38 checkArgument(initialized == false, "Already initialized");
39 this.urlPattern = urlPattern;
42 public synchronized void initialize() {
43 checkArgument(initialized == false, "Already initialized");
47 public boolean isInitialized() {