001/* 002 * This library is part of OpenCms - 003 * the Open Source Content Management System 004 * 005 * Copyright (c) Alkacon Software GmbH & Co. KG (http://www.alkacon.com) 006 * 007 * This library is free software; you can redistribute it and/or 008 * modify it under the terms of the GNU Lesser General Public 009 * License as published by the Free Software Foundation; either 010 * version 2.1 of the License, or (at your option) any later version. 011 * 012 * This library is distributed in the hope that it will be useful, 013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 015 * Lesser General Public License for more details. 016 * 017 * For further information about Alkacon Software, please see the 018 * company website: http://www.alkacon.com 019 * 020 * For further information about OpenCms, please see the 021 * project website: http://www.opencms.org 022 * 023 * You should have received a copy of the GNU Lesser General Public 024 * License along with this library; if not, write to the Free Software 025 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 026 */ 027 028package org.opencms.ade.contenteditor.shared; 029 030import java.util.Collections; 031import java.util.List; 032 033import com.google.gwt.user.client.rpc.IsSerializable; 034 035/** 036 * External widget configuration settings.<p> 037 */ 038public class CmsExternalWidgetConfiguration implements IsSerializable { 039 040 /** The links to required CSS resources. */ 041 private List<String> m_cssResourceLinks; 042 043 /** The java script initialization call. */ 044 private String m_initCall; 045 046 /** The links to the required java script resources. */ 047 private List<String> m_javaScriptResourceLinks; 048 049 /** The widget name. */ 050 private String m_widgetName; 051 052 /** 053 * @param widgetName the widget name 054 * @param initCall the java script initialization call 055 * @param javaScriptResourceLinks the java script resource links 056 * @param cssResourceLinks the CSS resource links 057 */ 058 public CmsExternalWidgetConfiguration( 059 String widgetName, 060 String initCall, 061 List<String> javaScriptResourceLinks, 062 List<String> cssResourceLinks) { 063 064 m_widgetName = widgetName; 065 m_initCall = initCall; 066 m_javaScriptResourceLinks = javaScriptResourceLinks; 067 m_cssResourceLinks = cssResourceLinks; 068 } 069 070 /** 071 * Constructor, for serialization only.<p> 072 */ 073 protected CmsExternalWidgetConfiguration() { 074 075 // nothing to do 076 } 077 078 /** 079 * Returns the CSS resource links.<p> 080 * 081 * @return the CSS resource links 082 */ 083 public List<String> getCssResourceLinks() { 084 085 return m_cssResourceLinks != null ? m_cssResourceLinks : Collections.<String> emptyList(); 086 } 087 088 /** 089 * Returns the java script initialization call.<p> 090 * 091 * @return the java script initialization call 092 */ 093 public String getInitCall() { 094 095 return m_initCall; 096 } 097 098 /** 099 * Returns the java script resource links.<p> 100 * 101 * @return the java script resource links 102 */ 103 public List<String> getJavaScriptResourceLinks() { 104 105 return m_javaScriptResourceLinks != null ? m_javaScriptResourceLinks : Collections.<String> emptyList(); 106 } 107 108 /** 109 * Returns the widget name.<p> 110 * 111 * @return the widget name 112 */ 113 public String getWidgetName() { 114 115 return m_widgetName; 116 } 117 118}