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.auth.gui;
24 public abstract class NamedCode implements ContentCode {
25 private final boolean noCache;
27 private String[] idattrs;
30 * Mark whether this code should not be cached, and any attributes
32 public NamedCode(final boolean noCache, final String name) {
34 idattrs = new String[] {name};
35 this.noCache = noCache;
38 public NamedCode(boolean noCache, NamedCode content) {
39 this.noCache = noCache;
41 idattrs = content.idattrs;
45 * Return ID and Any Attributes needed to create a "div" section of this code
48 public String[] idattrs() {
52 public void addAttr(boolean first, String attr) {
53 String[] temp = new String[idattrs.length+1];
56 System.arraycopy(idattrs, 0, temp, 1, idattrs.length);
58 temp[idattrs.length] = attr;
59 System.arraycopy(idattrs, 0, temp, 0, idattrs.length);
64 public boolean noCache() {