All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.apigee.buildTools.enterprise4g.utils.ConfigTokens Maven / Gradle / Ivy

There is a newer version: 2.5.2-rc2
Show newest version
/**
 * Copyright (C) 2014 Apigee Corporation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *         http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package io.apigee.buildTools.enterprise4g.utils;

import java.util.List;

import com.google.api.client.util.Key;

/**
 * maps to config items
 * @author sdey
 */

public class ConfigTokens { // represents configuration files containing all
							// tokens for an app bundle.

	@Key
	public List configurations;

	public class Configurations {

		@Key
		public String name;
		public List policies; // for listing all policy level tokens in
										// step definition xmla
		public List proxies; // for listing all proxy level tokens
										// inside proxies folder
		
		public List targets; // for listing all target level tokens 
									 // inside targets folder
		
		public String getName() {
			return name;
		}
		public void setName(String name) {
			this.name = name;
		}
		public List getPolicies() {
			return policies;
		}
		public void setPolicies(List policies) {
			this.policies = policies;
		}
		public List getProxies() {
			return proxies;
		}
		public void setProxies(List proxies) {
			this.proxies = proxies;
		}
		
		public Policy getPolicyFileNameMatch(String name){
			for(int i=0;i getTargets() {
			return targets;
		}
		public void setTargets(List targets) {
			this.targets = targets;
		}

	}

	// Token is a key value pair for each environment specific policy element,
	// per environment

	public class Token {

		@Key
		public String xpath;

		@Key
		public String value;

		public String getXpath() {
			return xpath;
		}

		public void setXpath(String xpath) {
			this.xpath = xpath;
		}

		public String getValue() {
			return value;
		}

		public void setValue(String value) {
			this.value = value;
		}
	}

	// policy here is for listing all tokens for a XML policy file or a API
	// Proxy xml file

	public class Policy {

		@Key
		public String name;
		@Key
		public List tokens;
		public String getName() {
			return name;
		}
		public void setName(String name) {
			this.name = name;
		}
		public List getTokens() {
			return tokens;
		}
		public void setTokens(List tokens) {
			this.tokens = tokens;
		}
	}

	public List getConfigurations() {
		return configurations;
	}

	public void setConfigurations(List configurations) {
		this.configurations = configurations;
	}
	
	public Configurations getConfigbyEnv(String name){
		for(int i=0;i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy