/* This file is part of JFLICKS. JFLICKS is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. JFLICKS is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with JFLICKS. If not, see <http://www.gnu.org/licenses/>. */ package org.jflicks.photomanager; import org.jflicks.configure.BaseConfig; import org.jflicks.configure.Configuration; import org.jflicks.configure.NameValue; import org.jflicks.nms.NMS; import org.jflicks.nms.NMSConstants; /** * A base implementation of the Photo interface. * * @author Doug Barnum * @version 1.0 */ public abstract class BasePhotoManager extends BaseConfig implements PhotoManager { private String title; private NMS nms; /** * Simple constructor. */ public BasePhotoManager() { } /** * {@inheritDoc} */ public String getTitle() { return (title); } /** * Convenience method tp set the title property. * * @param s A given title as a String. */ public void setTitle(String s) { title = s; } /** * {@inheritDoc} */ public NMS getNMS() { return (nms); } /** * {@inheritDoc} */ public void setNMS(NMS n) { nms = n; } protected String getConfiguredPhotoManagerURL() { String result = null; Configuration c = getConfiguration(); if (c != null) { NameValue nv = c.findNameValueByName(NMSConstants.PHOTO_MANAGER_URL); if (nv != null) { result = nv.getValue(); } } return (result); } }