001
002/* ***** BEGIN LICENSE BLOCK *****
003 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
004 *
005 * The contents of this file are subject to the Mozilla Public License Version
006 * 1.1 (the "License"); you may not use this file except in compliance with
007 * the License. You may obtain a copy of the License at
008 * http://www.mozilla.org/MPL/
009 *
010 * Software distributed under the License is distributed on an "AS IS" basis,
011 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
012 * for the specific language governing rights and limitations under the
013 * License.
014 *
015 * The Original Code is part of dcm4che, an implementation of DICOM(TM) in
016 * Java(TM), hosted at https://github.com/gunterze/dcm4che.
017 *
018 * The Initial Developer of the Original Code is
019 * Agfa Healthcare.
020 * Portions created by the Initial Developer are Copyright (C) 2011
021 * the Initial Developer. All Rights Reserved.
022 *
023 * Contributor(s):
024 * See @authors listed below
025 *
026 * Alternatively, the contents of this file may be used under the terms of
027 * either the GNU General Public License Version 2 or later (the "GPL"), or
028 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
029 * in which case the provisions of the GPL or the LGPL are applicable instead
030 * of those above. If you wish to allow use of your version of this file only
031 * under the terms of either the GPL or the LGPL, and not to allow others to
032 * use your version of this file under the terms of the MPL, indicate your
033 * decision by deleting the provisions above and replace them with the notice
034 * and other provisions required by the GPL or the LGPL. If you do not delete
035 * the provisions above, a recipient may use your version of this file under
036 * the terms of any one of the MPL, the GPL or the LGPL.
037 *
038 * ***** END LICENSE BLOCK ***** */
039
040package org.dcm4che3.net.web;
041
042import org.dcm4che3.conf.core.api.ConfigurableClass;
043import org.dcm4che3.conf.core.api.ConfigurableProperty;
044import org.dcm4che3.conf.core.api.LDAP;
045import org.dcm4che3.net.AEExtension;
046
047/**
048 * @author Hesham Elbadawi <bsdreko@gmail.com>
049 * 
050 */
051
052@LDAP(objectClasses = "dcmArchiveAEWebServices", noContainerNode = true)
053@ConfigurableClass
054public class WebServiceAEExtension extends AEExtension {
055
056    private static final long serialVersionUID = -2390448404282661045L;
057
058    @ConfigurableProperty(name = "dcmWadoRSBaseURL")
059    private String wadoRSBaseURL;
060
061    @ConfigurableProperty(name = "dcmWadoURIBaseURL")
062    private String wadoURIBaseURL;
063
064    @ConfigurableProperty(name = "dcmStowRSBaseURL")
065    private String stowRSBaseURL;
066
067    @ConfigurableProperty(name = "dcmQidoRSBaseURL")
068    private String qidoRSBaseURL;
069
070    @ConfigurableProperty(name = "dcmRsCapabilitiesBaseURL")
071    private String rsCapabilitiesBaseURL;
072    
073    @ConfigurableProperty(name = "dcmStowQidoVerificationDelaySec", defaultValue = "60")
074    private int stowQidoVerificationDelaySec;
075
076    public String getWadoRSBaseURL() {
077        return wadoRSBaseURL;
078    }
079
080    public void setWadoRSBaseURL(String wadoRSBaseURL) {
081        this.wadoRSBaseURL = wadoRSBaseURL;
082    }
083
084    public String getWadoURIBaseURL() {
085        return wadoURIBaseURL;
086    }
087
088    public void setWadoURIBaseURL(String wadoURIBaseURL) {
089        this.wadoURIBaseURL = wadoURIBaseURL;
090    }
091
092    public String getStowRSBaseURL() {
093        return stowRSBaseURL;
094    }
095
096    public void setStowRSBaseURL(String stowRSBaseURL) {
097        this.stowRSBaseURL = stowRSBaseURL;
098    }
099
100    public String getQidoRSBaseURL() {
101        return qidoRSBaseURL;
102    }
103
104    public void setQidoRSBaseURL(String qidoRSBaseURL) {
105        this.qidoRSBaseURL = qidoRSBaseURL;
106    }
107
108    public String getRsCapabilitiesBaseURL() {
109        return rsCapabilitiesBaseURL;
110    }
111
112    public void setRsCapabilitiesBaseURL(String rsCapabilitiesBaseURL) {
113        this.rsCapabilitiesBaseURL = rsCapabilitiesBaseURL;
114    }
115    
116    public int getStowQidoVerificationDelaySec() {
117        return stowQidoVerificationDelaySec;
118    }
119
120    public void setStowQidoVerificationDelaySec(int stowQidoVerificationDelaySec) {
121        this.stowQidoVerificationDelaySec = stowQidoVerificationDelaySec;
122    }
123
124    @Override
125    public void reconfigure(AEExtension from) {
126        WebServiceAEExtension webServiceAEExtension = (WebServiceAEExtension) from;
127        setQidoRSBaseURL(webServiceAEExtension.getQidoRSBaseURL());
128        setRsCapabilitiesBaseURL(webServiceAEExtension.getRsCapabilitiesBaseURL());
129        setStowRSBaseURL(webServiceAEExtension.getStowRSBaseURL());
130        setWadoRSBaseURL(webServiceAEExtension.getWadoRSBaseURL());
131        setWadoURIBaseURL(webServiceAEExtension.getWadoURIBaseURL());
132        setStowQidoVerificationDelaySec(webServiceAEExtension.getStowQidoVerificationDelaySec());
133    }
134}