001/** 002 * 003 * Copyright (c) 2014, the Railo Company Ltd. All rights reserved. 004 * 005 * This library is free software; you can redistribute it and/or 006 * modify it under the terms of the GNU Lesser General Public 007 * License as published by the Free Software Foundation; either 008 * version 2.1 of the License, or (at your option) any later version. 009 * 010 * This library 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 GNU 013 * Lesser General Public License for more details. 014 * 015 * You should have received a copy of the GNU Lesser General Public 016 * License along with this library. If not, see <http://www.gnu.org/licenses/>. 017 * 018 **/ 019package lucee.runtime; 020 021import java.io.Serializable; 022import java.util.Map; 023 024import lucee.runtime.component.Property; 025import lucee.runtime.exp.ExpressionException; 026import lucee.runtime.type.Collection; 027import lucee.runtime.type.KeyImpl; 028import lucee.runtime.type.Struct; 029 030 031public class ComponentProperties implements Serializable { 032 033 private static final Collection.Key WSDL_FILE = KeyImpl.intern("wsdlfile"); 034 final String dspName; 035 final String extend; 036 final String hint; 037 final Boolean output; 038 final String callPath; 039 final boolean relPath; 040 final boolean _synchronized; 041 Class javaAccessClass; 042 Map<String,Property> properties; 043 Struct meta; 044 String implement; 045 boolean persistent; 046 boolean accessors; 047 048 public ComponentProperties(String dspName,String extend,String implement,String hint, Boolean output, String callPath, 049 boolean relPath,boolean _synchronized,Class javaAccessClass,boolean persistent,boolean accessors,Struct meta) { 050 this.dspName=dspName; 051 this.extend=extend; 052 this.implement=implement; 053 this.hint=hint; 054 this.output=output; 055 this.callPath=callPath; 056 this.relPath=relPath; 057 this._synchronized=_synchronized; 058 this.javaAccessClass=javaAccessClass; 059 this.meta=meta; 060 this.persistent=persistent; 061 this.accessors=accessors; 062 } 063 064 public ComponentProperties duplicate() { 065 ComponentProperties cp= new ComponentProperties(dspName,extend,implement,hint,output,callPath,relPath,_synchronized,javaAccessClass,persistent,accessors,meta); 066 cp.properties=properties; 067 return cp; 068 } 069 070 071 /** 072 * returns null if there is no wsdlFile defined 073 * @return the wsdlFile 074 * @throws ExpressionException 075 */ 076 public String getWsdlFile() { 077 if(meta==null) return null; 078 return (String) meta.get(WSDL_FILE,null); 079 } 080 081 082}