public abstract class

AbstractMagentoClient

extends Object
java.lang.Object
   ↳ org.mule.module.magento.api.AbstractMagentoClient
Known Direct Subclasses

Class Overview

Base class for all Magento clients. Magento clients follow the following conventions:

  • They are parameterized by the exception type they throw. For example, axis clients should be parameterized to throw RemoteExceptions, while MagentoClientAdaptor will throw MagentoExceptions
  • They are parameterized by the way they model attributes and attributes collections. For example, axis clients will answers arrays of magento objects for representing collection of attributes, while MagentoClientAdaptor will answer lists of maps, instead
  • Create and update operations take the target's object attributes in a Map with String keys and Object values.
  • Retrieve operations return object's attributes in a Map similar to the previously described

Summary

Fields
private final AxisPortProvider provider
Public Constructors
AbstractMagentoClient(AxisPortProvider provider)
Protected Methods
static boolean fromIntegerString(String value)
final Mage_Api_Model_Server_V2_HandlerPortType getPort()
final String getSessionId()
<K, V> Map<K, V> nullToEmpty(Map<K, V> attributes)
<T> Collection<T> nullToEmpty(Collection<T> collection)
static <T> T[] toArray(Collection<T> collection, Class<T> clazz)
static String toIntegerString(boolean value)
[Expand]
Inherited Methods
From class java.lang.Object

Fields

private final AxisPortProvider provider

Public Constructors

public AbstractMagentoClient (AxisPortProvider provider)

Parameters
provider

Protected Methods

protected static boolean fromIntegerString (String value)

Parameters
value

protected final Mage_Api_Model_Server_V2_HandlerPortType getPort ()

Throws
RemoteException

protected final String getSessionId ()

Throws
RemoteException

protected Map<K, V> nullToEmpty (Map<K, V> attributes)

Parameters
attributes

protected Collection<T> nullToEmpty (Collection<T> collection)

Parameters
collection

protected static T[] toArray (Collection<T> collection, Class<T> clazz)

Parameters
collection
clazz

protected static String toIntegerString (boolean value)

Parameters
value