2 * ============LICENSE_START====================================================
4 * ===========================================================================
5 * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
6 * ===========================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END====================================================
22 package org.onap.aaf.cadi.lur;
24 import java.security.Principal;
25 import java.util.List;
27 import org.onap.aaf.cadi.Lur;
28 import org.onap.aaf.cadi.Permission;
30 public class NullLur implements Lur {
31 private static final Permission NULL = new Permission() {
33 public String permType() {
38 public String getKey() {
43 public boolean match(Permission p) {
47 public boolean fish(Principal bait, Permission ... pond) {
48 // Well, for Jenkins, this is ok... It finds out it can't do J2EE Security, and then looks at it's own
49 // System.err.println("CADI's LUR has not been configured, but is still being called. Access is being denied");
53 public void fishAll(Principal bait, List<Permission> permissions) {
56 public void destroy() {
59 public boolean handlesExclusively(Permission ... pond) {
63 public boolean handles(Principal p) {
68 * @see org.onap.aaf.cadi.Lur#createPerm(java.lang.String)
71 public Permission createPerm(String p) {
76 * @see org.onap.aaf.cadi.Lur#clear(java.security.Principal, java.lang.StringBuilder)
79 public void clear(Principal p, StringBuilder report) {
80 report.append(NullLur.class.getSimpleName());
84 public String toString() {
85 return NullLur.class.getSimpleName() + '\n';