/********************************************************************************** * nWordPress is an automated migration of WordPress 2.5.1 performed by Numiton. * * copyright : (C) 2008 Numiton - www.numiton.com * email : numiton@users.sourceforge.net * * $Id: IXR_Base64.java,v 1.2 2008/10/03 18:45:30 numiton Exp $ * **********************************************************************************/ /********************************************************************************** * * This program 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 2 of the License, or * (at your option) any later version. * **********************************************************************************/ /*************************************************************************** * * This program 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 2 of the License, or * (at your option) any later version. * ***************************************************************************/ package org.numiton.nwp.wp_includes; import java.io.Serializable; import org.apache.log4j.Logger; import org.numiton.nwp.GlobalConsts; import org.numiton.nwp.GlobalVars; import com.numiton.URL; import com.numiton.generic.ContextCarrierInterface; import com.numiton.generic.GlobalConstantsInterface; import com.numiton.generic.GlobalVariablesContainer; public class IXR_Base64 implements ContextCarrierInterface, Serializable, Cloneable { protected static final Logger LOG = Logger.getLogger(IXR_Base64.class.getName()); public GlobalConsts gConsts; public GlobalVars gVars; public String data; public IXR_Base64(GlobalVars javaGlobalVariables, GlobalConsts javaGlobalConstants, String data) { setContext(javaGlobalVariables, javaGlobalConstants); this.data = data; } public String getXml() { return "<base64>" + URL.base64_encode(this.data) + "</base64>"; } public void setContext(GlobalVariablesContainer javaGlobalVariables, GlobalConstantsInterface javaGlobalConstants) { gConsts = (GlobalConsts) javaGlobalConstants; gVars = (GlobalVars) javaGlobalVariables; gVars.gConsts = gConsts; } public Object clone() throws CloneNotSupportedException { return super.clone(); } public GlobalVariablesContainer getGlobalVars() { return gVars; } }