com.novell.sentinel.json.java
Class BeanTransporterJSONSync<B extends SentinelBean>
java.lang.Object
com.novell.sentinel.client.bean.BeanTransporterBase<B,P>
com.novell.sentinel.client.bean.java.BeanTransporterSyncBase<B,JSONParser>
com.novell.sentinel.json.java.BeanTransporterJSONSync<B>
- All Implemented Interfaces:
- BeanTransporter<B>, BeanTransporterSync<B>
public class BeanTransporterJSONSync<B extends SentinelBean>
- extends BeanTransporterSyncBase<B,JSONParser>
Method Summary |
protected B |
createBean(JSONParser parser)
Derived classes must create a single instance of class B from the
HTTP GET result content obtained from the parser parameter. |
protected PagedBeanCollection<B> |
createPage(JSONParser parser)
Derived classes must create a PagedBeanCollection instance
based on the HTTP GET result content obtained from the parser parameter. |
protected JSONParser |
createParser(B bean)
Derived classes must create a data source from which can be obtained the
content data for an HTTP PUT or POST request. |
protected long |
parseCount(JSONParser parser)
Derived classes must parse the item count returned as a result of an HTTP GET request. |
protected String |
parseURL(JSONParser parser)
Derived classes must parse the URL returned as a result of an HTTP POST request. |
Methods inherited from class com.novell.sentinel.client.bean.java.BeanTransporterSyncBase |
cleanup, count, count, delete, delete, get, getOctetData, list, list, list, listFromURL, listFromURL, listFromURL, post, put, put |
Methods inherited from class com.novell.sentinel.client.bean.BeanTransporterBase |
cleanup, count, count, delete, delete, get, get, getBeanMD, getLocaleName, getRequestor, getSortFields, getUrlFactory, list, list, list, listFromURL, listFromURL, listFromURL, post, put, put, setLocaleName, setSortFields |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BeanTransporterJSONSync
public BeanTransporterJSONSync(BeanMetaData<? extends B> _beanMD,
HttpRequestor<JSONParser> _requestor,
UriConstructorFactory _urlFactory)
createPage
protected PagedBeanCollection<B> createPage(JSONParser parser)
throws BeanSerializationException
- Description copied from class:
BeanTransporterBase
- Derived classes must create a PagedBeanCollection instance
based on the HTTP GET result content obtained from the parser parameter.
- Specified by:
createPage
in class BeanTransporterBase<B extends SentinelBean,JSONParser>
- Parameters:
parser
- The source of the HTTP GET results.
- Returns:
- A page implementation.
- Throws:
BeanSerializationException
- if an error occurs during construction from the GET results.
createBean
protected B createBean(JSONParser parser)
throws BeanSerializationException
- Description copied from class:
BeanTransporterBase
- Derived classes must create a single instance of class B from the
HTTP GET result content obtained from the parser parameter.
- Specified by:
createBean
in class BeanTransporterBase<B extends SentinelBean,JSONParser>
- Parameters:
parser
- The source of the HTTP GET results.
- Returns:
- The created bean.
- Throws:
BeanSerializationException
- if an error occurs during construction from the GET results.
createParser
protected JSONParser createParser(B bean)
throws BeanSerializationException
- Description copied from class:
BeanTransporterBase
- Derived classes must create a data source from which can be obtained the
content data for an HTTP PUT or POST request.
- Specified by:
createParser
in class BeanTransporterBase<B extends SentinelBean,JSONParser>
- Parameters:
bean
- The bean containing the Sentinel data item fields.
- Returns:
- A source for HTTP PUT or POST content.
- Throws:
BeanSerializationException
- if an error occurs during the construction of the data source.
parseURL
protected String parseURL(JSONParser parser)
throws BeanTransporterBase.ParseException
- Description copied from class:
BeanTransporterBase
- Derived classes must parse the URL returned as a result of an HTTP POST request.
- Specified by:
parseURL
in class BeanTransporterBase<B extends SentinelBean,JSONParser>
- Parameters:
parser
- The source for the result content of the HTTP POST request.
- Returns:
- The URL from the result content.
- Throws:
BeanTransporterBase.ParseException
- If an error occurs during the parsing of the POST result content.
parseCount
protected long parseCount(JSONParser parser)
throws BeanTransporterBase.ParseException
- Description copied from class:
BeanTransporterBase
- Derived classes must parse the item count returned as a result of an HTTP GET request.
- Specified by:
parseCount
in class BeanTransporterBase<B extends SentinelBean,JSONParser>
- Parameters:
parser
- The source for the result content of the HTTP GET request.
- Returns:
- The URL from the result content.
- Throws:
BeanTransporterBase.ParseException
- If an error occurs during the parsing of the GET result content.