001    package org.cumulus4j.keymanager.front.shared;
002    
003    import java.io.Serializable;
004    
005    import javax.xml.bind.annotation.XmlRootElement;
006    
007    /**
008     * <p>
009     * Response sent as confirmation when an {@link AppServer} was PUT into the key-server.
010     * </p><p>
011     * The <code>AppServer</code>'s {@link AppServer#getAppServerID() ID} might be <code>null</code> when the ID
012     * should be assigned by the key-server (recommended), this response tells the client the app-server's ID
013     * (no matter, if the client already assigned it and thus already knows it or whether the server assigned it).
014     * </p><p>
015     * The server sends this object instead of a simple {@link String} to (1) make later extension easier (e.g.
016     * include additional meta-data like an expiry) and (2) to keep the API consistent. Furthermore it makes
017     * using the Jersey client API easier, as it can always expect an XML (or JSON) result, no matter if it was
018     * successful (appServerID returned as text/plain) or an exception occured (an {@link Error} is sent in XML
019     * (or JSON) form).
020     * </p>
021     *
022     * @author Marco หงุ่ยตระกูล-Schulze - marco at nightlabs dot de
023     */
024    @XmlRootElement
025    public class PutAppServerResponse implements Serializable
026    {
027            private static final long serialVersionUID = 1L;
028    
029            private String appServerID;
030    
031            public PutAppServerResponse() { }
032    
033            public PutAppServerResponse(String appServerID) {
034                    this.appServerID = appServerID;
035            }
036    
037            public String getAppServerID() {
038                    return appServerID;
039            }
040            public void setAppServerID(String appServerID) {
041                    this.appServerID = appServerID;
042            }
043    }