001 /* 002 * Cumulus4j - Securing your data in the cloud - http://cumulus4j.org 003 * Copyright (C) 2011 NightLabs Consulting GmbH 004 * 005 * This program is free software: you can redistribute it and/or modify 006 * it under the terms of the GNU Affero General Public License as 007 * published by the Free Software Foundation, either version 3 of the 008 * License, or (at your option) any later version. 009 * 010 * This program is distributed in the hope that it will be useful, 011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 013 * GNU Affero General Public License for more details. 014 * 015 * You should have received a copy of the GNU Affero General Public License 016 * along with this program. If not, see <http://www.gnu.org/licenses/>. 017 */ 018 package org.cumulus4j.keymanager.front.shared; 019 020 import java.io.Serializable; 021 022 import javax.xml.bind.annotation.XmlRootElement; 023 024 /** 025 * <p> 026 * DTO representing an app-server. 027 * </p><p> 028 * An <code>AppServer</code> represents a logical application server. This logical application server 029 * might be a cluster/cloud consisting of many physical machines. 030 * </p><p> 031 * An <code>AppServer</code> contains the coordinates needed to contact the application server 032 * (or more precisely the key-manager-channel-REST-service 033 * running on this application server) in order to establish a communication channel. See 034 * <a target="_blank" href="http://cumulus4j.org/1.0.0/documentation/deployment-scenarios.html">Deployment scenarios</a>. 035 * </p> 036 * @author Marco หงุ่ยตระกูล-Schulze - marco at nightlabs dot de 037 */ 038 @XmlRootElement 039 public class AppServer 040 implements Serializable 041 { 042 private static final long serialVersionUID = 1L; 043 044 private String appServerID; 045 046 private String appServerBaseURL; 047 048 /** 049 * <p> 050 * Get the app-server's ID. 051 * </p><p> 052 * If this instance of <code>AppServer</code> is used to PUT an app-server into the key-server, 053 * then this property can be <code>null</code> in order to have the 054 * key-server assign the ID. The app-server's ID is sent back to the client in a {@link PutAppServerResponse}. 055 * </p> 056 * @return the app-server's ID. 057 * @see #setAppServerID(String) 058 */ 059 public String getAppServerID() { 060 return appServerID; 061 } 062 /** 063 * Set the app-server's ID. 064 * @param appServerID the app-server's ID. 065 * @see #getAppServerID() 066 */ 067 public void setAppServerID(String appServerID) { 068 this.appServerID = appServerID; 069 } 070 /** 071 * Get the base-url of the app-server-key-manager-channel. This is the part of the URL before the "/KeyManagerChannel" - 072 * e.g. if the REST URL of the KeyManagerChannel-service is 073 * "https://serverUsingCumulus4j.mydomain.org/org.cumulus4j.keymanager.back.webapp/KeyManagerChannel", then this must be 074 * "https://serverUsingCumulus4j.mydomain.org/org.cumulus4j.keymanager.back.webapp". 075 * @return the base-url of the app-server-key-manager-channel. 076 * @see #setAppServerBaseURL(String) 077 */ 078 public String getAppServerBaseURL() { 079 return appServerBaseURL; 080 } 081 /** 082 * Set the base-url of the app-server-key-manager-channel. 083 * @param appServerBaseURL the base-url of the app-server-key-manager-channel. 084 * @see #getAppServerBaseURL() 085 */ 086 public void setAppServerBaseURL(String appServerBaseURL) { 087 this.appServerBaseURL = appServerBaseURL; 088 } 089 }