All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.code.magja.magento.Properties Maven / Gradle / Ivy

Go to download

Magja is a java connector for access the Magento API (http://www.magentocommerce.com/support/magento_core_api), with that you will be able to manipulate the magento products (images include), categories, customers, orders, and much more. Just you have to do its create a properties file with the connection parameters for the magento installation. For more information visit the project page.

There is a newer version: 0.0.3
Show newest version
/**
 * based on source code from k5
 * http://www.magentocommerce.com/boards/viewthread/37982/
 *
 * @author Pawel Konczalski 
 *
 * You are free to use it under the terms of the GNU General Public License
 */

package com.google.code.magja.magento;

import java.util.HashMap;
import java.util.Map;

public class Properties {

	/*
	 * Variables
	 */
	private Map properties = new HashMap();

	/*
	 * Check and set property
	 */
	public void set(String name, Object value) {
		if (value != null) {
			properties.put(name, value);
		}
	}

	/*
	 * Get property
	 */
	public Object get(String name) {
		return properties.get(name);
	}

	/*
	 * Getter
	 */
	public Map getProperties() {
		return properties;
	}

	/*
	 * convert int array to string array
	 */
	protected String[] getStringArray(int[] arrayIn) {
		String[] arrayOut = new String[arrayIn.length];
		for (int i = 0; i < arrayIn.length; i++) {
			arrayOut[i] = arrayIn[i] + "";
		}

		return arrayOut;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy