|
IP*Works! V9 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectipworks.Odata
public class Odata
The OData component implements the Open Data Protocol (OData). It can be used to query, parse, and update/modify data contained within an OData service.
The OData component allows you to easily query OData services and create, update, and delete entries within a service.
To query a service, you can set the ServiceRootURI
to the service's root URI and ResourcePath
to the
collection within the service that you wish to query. Optionally you can set the Query*** properties to filter the results. QueryService
can then be called to retrieve the results (which can be viewed via the Entry*** properties).
OData1.ServiceRootURI = "http://services.odata.org/OData/OData.svc"
OData1.ResourcePath = "Products"
OData1.QueryService()
To create a new entry, you can set the ServiceRootURI
to the service's root URI and ResourcePath
to the
collection within the service that you wish to add the entry to. The Entry*** properties can be set to the values you
wish to use to create the entry. CreateEntry
can then be called to create the entry.
OData1.ServiceRootURI = "http://services.odata.org/OData/OData.svc"
OData1.ResourcePath = "Products"
OData1.EntryProperties
OData1.CreateEntry()
If you wish to update an entry, you can set the ServiceRootURI
to the service's root URI
and ResourcePath
to the specific entry you wish to update. The Entry*** properties can
be set to the values you wish to update. UpdateEntry
can then be called to update the entry.
OData1.ServiceRootURI = "http://services.odata.org/OData/OData.svc"
OData1.ResourcePath = "Products(1)"
// Index 1 is the "Name" property.
OData1.EntryProperties[1].Value = "MyNewName"
OData1.UpdateEntry()
Deleting an entry requires that you first set the ServiceRootURI
to the service's root URI and ResourcePath
to the specific entry you wish to delete. DeleteEntry
can then be called to
delete the entry.
OData1.ServiceRootURI = "http://services.odata.org/OData/OData.svc"
OData1.ResourcePath = "Products(1)"
OData1.DeleteEntry()
In addition to querying a service and manipulating its containing data, the OData component also allows
you to retrieve the schema (metadata document) to determine the structure of a service. After setting ServiceRootURI
to the root URI of the service, GetSchema
can be called to retrieve the metadata
document. The Schema*** properties will be populated upon successful retrieval of the metadata document
allowing you to identify the structure of the service.
OData1.ServiceRootURI = "http://services.odata.org/OData/OData.svc"
OData1.GetSchema()
Field Summary | |
---|---|
static int |
authBasic
|
static int |
authDigest
|
static int |
authNegotiate
|
static int |
authNone
|
static int |
authNtlm
|
static int |
authOAuth
|
static int |
authProprietary
|
Constructor Summary | |
---|---|
Odata()
Creates an instance of Odata Bean. |
|
Odata(java.lang.String runtimeLicense)
Creates an instance of Odata Bean with specified run-time license. |
Method Summary | |
---|---|
void |
addOdataEventListener(OdataEventListener l)
|
java.lang.String |
config(java.lang.String configurationString)
Sets or retrieves a configuration setting. |
void |
createEntry()
Creates a new entry within the specified OData service resource. |
void |
customRequest(java.lang.String HTTPMethod,
java.lang.String URL,
java.lang.String postData)
Sends a request to the specified URL using the HTTP Method and Post Data provided. |
void |
deleteEntry()
Deletes an entry within an OData service resource. |
java.lang.String |
getAuthorization()
The Authorization string to be sent to the server. |
int |
getAuthScheme()
The authentication scheme to use when server authorization is required. |
AtomChannel |
getChannel()
The feed elements of a feed. |
HTTPCookieList |
getCookies()
Collection of cookies. |
java.lang.String |
getEntryAuthor()
The Author of the current entry in an OData feed. |
int |
getEntryCount()
The number of entries contained within an OData feed. |
java.lang.String |
getEntryETag()
The ETag of the current entry in an OData feed. |
java.lang.String |
getEntryId()
The ID of the current entry in an OData feed. |
int |
getEntryIndex()
The index of the current entry in an OData feed. |
ODataEntryLinkList |
getEntryLinks()
A collection of links in the current OData entry. |
ODataEntryPropertyList |
getEntryProperties()
A collection of elements in the current OData entry. |
java.lang.String |
getEntryProperty(java.lang.String XPath)
Get an OData entry property. |
java.lang.String |
getEntrySummary()
The Summary of the current entry in an OData feed. |
java.lang.String |
getEntryTitle()
The Title of the current entry in an OData feed. |
java.lang.String |
getEntryUpdated()
The Date-Time when current entry in an OData feed was updated. |
java.lang.String |
getEntryXML()
The raw XML of the current entry in an OData feed. |
Firewall |
getFirewall()
A set of properties related to firewall access. |
java.lang.String |
getLocalHost()
The name of the local host or user-assigned IP interface through which connections are initiated or accepted. |
java.lang.String |
getOtherHeaders()
Other headers as determined by the user (optional). |
java.lang.String |
getOtherQueryOptions()
Additional Query Options to be used when querying a service. |
HeaderList |
getParsedHeaders()
Collection of headers returned from the last request. |
java.lang.String |
getPassword()
A password if authentication is to be used. |
Proxy |
getProxy()
A set of properties related to proxy access. |
java.lang.String |
getQueryFilter()
Selects only the entries that satisfy the specified filter (expression). |
java.lang.String |
getQueryOrderBy()
The value used to order entries when querying a service. |
java.lang.String |
getQuerySelect()
Selects only the specified properties to be returned in an entry when querying a service. |
java.lang.String |
getQuerySkip()
The number of entries to skip when querying a service. |
java.lang.String |
getQuerySkipToken()
Token given by an OData server when the last query result collection is too large. |
java.lang.String |
getQueryTop()
Selects the first N entries when querying a service. |
java.lang.String |
getResourcePath()
The Resource Path of an OData service. |
void |
getSchema()
Retrieves the schema for a service. |
ODataSchemaAssociation |
getSchemaAssociation()
The navigation properties and their corresponding associations contained within an entity of a service schema. |
int |
getSchemaAssociationCount()
The number of navigation properties contained within an OData schema entity. |
int |
getSchemaAssociationIndex()
The index of the current navigation property in an OData schema entity. |
ODataSchemaEntity |
getSchemaEntity()
The entities contained within a service schema. |
int |
getSchemaEntityCount()
The number of entities contained within an OData schema. |
int |
getSchemaEntityIndex()
The index of the current entity in an OData schema. |
java.lang.String[] |
getSchemaKeys()
The keys of a schema entity. |
ODataSchemaProperty |
getSchemaProperty()
The properties contained within an entity of a service schema. |
int |
getSchemaPropertyCount()
The number of properties contained within an OData schema entity. |
int |
getSchemaPropertyIndex()
The index of the current property in an OData schema entity. |
ODataSchemaProperty |
getSchemaTypeField()
The fields (properties) contained within a complex type. |
int |
getSchemaTypeFieldCount()
The number of properties contained within an OData schema complex type. |
int |
getSchemaTypeFieldIndex()
The index of the current field (property) in an OData schema complex type. |
java.lang.String |
getServiceRootURI()
The root URI of an OData service. |
int |
getTimeout()
A timeout for the bean. |
byte[] |
getTransferredData()
The contents of the last response from the server. |
java.lang.String |
getUser()
A user name if authentication is to be used. |
XMLAttributeList |
getXAttributes()
A collection of attributes of the current element. |
XMLElementList |
getXChildren()
Collection of child elements of the current element. |
java.lang.String |
getXElement()
The name of the current element. |
java.lang.String |
getXNamespace()
The namespace of the current element. |
java.lang.String |
getXParent()
The parent of the current element. |
java.lang.String |
getXPath()
Provides a way to point to a specific element in the document. |
java.lang.String |
getXPrefix()
The prefix of the current element. |
java.lang.String |
getXSubTree()
A snapshot of the current element in the document. |
java.lang.String |
getXText()
The text of the current element. |
boolean |
hasXPath(java.lang.String xpath)
Determines whether a specific element exists in the document. |
boolean |
isIdle()
The current status of the component. |
void |
queryService()
Queries an OData service using the specified parameters. |
void |
removeOdataEventListener(OdataEventListener l)
|
void |
reset()
Reset all properties of the bean. |
void |
setAuthorization(java.lang.String authorization)
The Authorization string to be sent to the server. |
void |
setAuthScheme(int authScheme)
The authentication scheme to use when server authorization is required. |
void |
setChannel(AtomChannel channel)
The feed elements of a feed. |
void |
setEntryAuthor(java.lang.String entryAuthor)
The Author of the current entry in an OData feed. |
void |
setEntryETag(java.lang.String entryETag)
The ETag of the current entry in an OData feed. |
void |
setEntryId(java.lang.String entryId)
The ID of the current entry in an OData feed. |
void |
setEntryIndex(int entryIndex)
The index of the current entry in an OData feed. |
void |
setEntryProperty(java.lang.String XPath,
java.lang.String value)
Set an OData entry property. |
void |
setEntrySummary(java.lang.String entrySummary)
The Summary of the current entry in an OData feed. |
void |
setEntryTitle(java.lang.String entryTitle)
The Title of the current entry in an OData feed. |
void |
setEntryXML(java.lang.String entryXML)
The raw XML of the current entry in an OData feed. |
void |
setFirewall(Firewall firewall)
A set of properties related to firewall access. |
void |
setLocalHost(java.lang.String localHost)
The name of the local host or user-assigned IP interface through which connections are initiated or accepted. |
void |
setOtherHeaders(java.lang.String otherHeaders)
Other headers as determined by the user (optional). |
void |
setOtherQueryOptions(java.lang.String otherQueryOptions)
Additional Query Options to be used when querying a service. |
void |
setPassword(java.lang.String password)
A password if authentication is to be used. |
void |
setProxy(Proxy proxy)
A set of properties related to proxy access. |
void |
setQueryFilter(java.lang.String queryFilter)
Selects only the entries that satisfy the specified filter (expression). |
void |
setQueryOrderBy(java.lang.String queryOrderBy)
The value used to order entries when querying a service. |
void |
setQuerySelect(java.lang.String querySelect)
Selects only the specified properties to be returned in an entry when querying a service. |
void |
setQuerySkip(java.lang.String querySkip)
The number of entries to skip when querying a service. |
void |
setQuerySkipToken(java.lang.String querySkipToken)
Token given by an OData server when the last query result collection is too large. |
void |
setQueryTop(java.lang.String queryTop)
Selects the first N entries when querying a service. |
void |
setResourcePath(java.lang.String resourcePath)
The Resource Path of an OData service. |
void |
setSchemaAssociationIndex(int schemaAssociationIndex)
The index of the current navigation property in an OData schema entity. |
void |
setSchemaEntity(java.lang.String name)
Sets the schema entity. |
void |
setSchemaEntityIndex(int schemaEntityIndex)
The index of the current entity in an OData schema. |
void |
setSchemaProperty(java.lang.String name)
Sets the schema property. |
void |
setSchemaPropertyIndex(int schemaPropertyIndex)
The index of the current property in an OData schema entity. |
void |
setSchemaType(java.lang.String name)
Sets the schema type. |
void |
setSchemaTypeFieldIndex(int schemaTypeFieldIndex)
The index of the current field (property) in an OData schema complex type. |
void |
setServiceRootURI(java.lang.String serviceRootURI)
The root URI of an OData service. |
void |
setTimeout(int timeout)
A timeout for the bean. |
void |
setUser(java.lang.String user)
A user name if authentication is to be used. |
void |
setXPath(java.lang.String XPath)
Provides a way to point to a specific element in the document. |
void |
updateEntry()
Update an OData entry. |
void |
updateProperty(java.lang.String XPath,
java.lang.String value)
Update an OData entry property. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int authBasic
public static final int authDigest
public static final int authProprietary
public static final int authNone
public static final int authNtlm
public static final int authNegotiate
public static final int authOAuth
Constructor Detail |
---|
public Odata()
public Odata(java.lang.String runtimeLicense)
Method Detail |
---|
public java.lang.String getAuthorization()
If the Authorization
property contains a non-empty string,
an Authorization HTTP request header is added to the
request. This header conveys Authorization information to the
server.
A common use for this property is to specify OAuth authorization string.
This property is provided so that the HTTP bean can be extended with other security schemes in addition to the authorization schemes already implemented by the bean.
The AuthScheme
property defines the authentication scheme used.
In the case of HTTP Basic Authentication (default), every time User
and Password
are set, they are Base64 encoded,
and the result is put in the Authorization property
in the form "Basic [encoded-user-password]".
public void setAuthorization(java.lang.String authorization) throws IPWorksException
If the Authorization
property contains a non-empty string,
an Authorization HTTP request header is added to the
request. This header conveys Authorization information to the
server.
A common use for this property is to specify OAuth authorization string.
This property is provided so that the HTTP bean can be extended with other security schemes in addition to the authorization schemes already implemented by the bean.
The AuthScheme
property defines the authentication scheme used.
In the case of HTTP Basic Authentication (default), every time User
and Password
are set, they are Base64 encoded,
and the result is put in the Authorization property
in the form "Basic [encoded-user-password]".
IPWorksException
public int getAuthScheme()
This property will tell the bean which type of authorization to perform when the User
and Password
properties are set.
This property should be set to authNone (3) when no authentication is to be performed.
By default, this property is authBasic (0), and if the User
and Password
properties are set, the bean will attempt basic authentication. If AuthScheme is set to authDigest (1), authNtlm (4) or authNegotiate (5), digest, NTLM or Negotiate authentication will be attempted instead.
If AuthScheme is set to authProprietary (2) then the authorization token must be supplied through Authorization
property.
If AuthScheme is set to authOAuth (6) then the authorization string must be supplied through Authorization
property.
Note that, if you set the Authorization
property and AuthScheme is not authProprietary or authOAuth, the AuthScheme will be set automatically to authProprietary (2) by the control.
For security purposes, changing the value of this property will cause the bean to clear the values of User
, Password
and Authorization
.
public void setAuthScheme(int authScheme) throws IPWorksException
This property will tell the bean which type of authorization to perform when the User
and Password
properties are set.
This property should be set to authNone (3) when no authentication is to be performed.
By default, this property is authBasic (0), and if the User
and Password
properties are set, the bean will attempt basic authentication. If AuthScheme is set to authDigest (1), authNtlm (4) or authNegotiate (5), digest, NTLM or Negotiate authentication will be attempted instead.
If AuthScheme is set to authProprietary (2) then the authorization token must be supplied through Authorization
property.
If AuthScheme is set to authOAuth (6) then the authorization string must be supplied through Authorization
property.
Note that, if you set the Authorization
property and AuthScheme is not authProprietary or authOAuth, the AuthScheme will be set automatically to authProprietary (2) by the control.
For security purposes, changing the value of this property will cause the bean to clear the values of User
, Password
and Authorization
.
IPWorksException
public AtomChannel getChannel()
This property contains the "feed" elements of an
ATOM feed. The Channel
property has fields which contain values for sub-elements of the "feed" element.
public void setChannel(AtomChannel channel) throws IPWorksException
This property contains the "feed" elements of an
ATOM feed. The Channel
property has fields which contain values for sub-elements of the "feed" element.
IPWorksException
public HTTPCookieList getCookies()
This property contains a collection of cookies. To add cookies to outgoing HTTP requests, add cookies (of type httpcookie
) to this collection.
To see cookies that are set by the server, use the SetCookie
event, which displays the cookies and their properties as set by the server.
Those cookies are also added to Cookies
.
MaxHTTPCookies
can be used to control the maximum number of cookies saved.
This collection is indexed from 0 to size - 1.
public java.lang.String getEntryAuthor()
This property contains the author of the specified entry
within an OData feed. This value will be populated once EntryIndex
is set (provided that an author can be found).
public void setEntryAuthor(java.lang.String entryAuthor) throws IPWorksException
This property contains the author of the specified entry
within an OData feed. This value will be populated once EntryIndex
is set (provided that an author can be found).
IPWorksException
public int getEntryCount()
This property is updated to reflect the total number of entries returned within a response (whether you are retrieving a feed/entry or making changes to a feed/entry).
public java.lang.String getEntryETag()
This property is used to obtain the ETag of the specified entry
within an OData feed and will be populated once EntryIndex
is set.
This property is also used when retrieving, updating or deleting an entry.
When EntryETag contains a non-empty string, an "If-None-Match" header will
be sent with the entered value when QueryService
is called.
When DeleteEntry
or UpdateEntry
is called, an "If-Match" header
will be sent with the entered value.
public void setEntryETag(java.lang.String entryETag) throws IPWorksException
This property is used to obtain the ETag of the specified entry
within an OData feed and will be populated once EntryIndex
is set.
This property is also used when retrieving, updating or deleting an entry.
When EntryETag contains a non-empty string, an "If-None-Match" header will
be sent with the entered value when QueryService
is called.
When DeleteEntry
or UpdateEntry
is called, an "If-Match" header
will be sent with the entered value.
IPWorksException
public java.lang.String getEntryId()
This property contains the ID of the specified entry
within an OData feed. This value will be populated once EntryIndex
is set (provided that an ID can be found).
public void setEntryId(java.lang.String entryId) throws IPWorksException
This property contains the ID of the specified entry
within an OData feed. This value will be populated once EntryIndex
is set (provided that an ID can be found).
IPWorksException
public int getEntryIndex()
This property is used to specify an entry within a retrieved OData feed.
Once set, EntryAuthor
, EntryETag
, EntryTitle
, EntrySummary
, EntryUpdated
, EntryLinks
, EntryProperties
and ResourcePath
will be populated with their respective values found within the entry.
This property takes index values from 0 to EntryCount
-1.
Setting EntryIndex to -1 will clear the entries contained by the
component and will also reset EntryProperties
and EntryCount
.
public void setEntryIndex(int entryIndex) throws IPWorksException
This property is used to specify an entry within a retrieved OData feed.
Once set, EntryAuthor
, EntryETag
, EntryTitle
, EntrySummary
, EntryUpdated
, EntryLinks
, EntryProperties
and ResourcePath
will be populated with their respective values found within the entry.
This property takes index values from 0 to EntryCount
-1.
Setting EntryIndex to -1 will clear the entries contained by the
component and will also reset EntryProperties
and EntryCount
.
IPWorksException
public ODataEntryLinkList getEntryLinks()
This is a collection of links (referred to as Navigation Properties) in the current OData entry,
as specified by EntryIndex
. When EntryIndex
is set, all of the elements in the entry are
stored as ODataEntryLink
types in this collection.
public ODataEntryPropertyList getEntryProperties()
This is a collection of elements in the current OData entry,
as specified by EntryIndex
. When EntryIndex
is set,
all of the elements in the entry are stored as ODataEntryProperty
types in this collection.
public java.lang.String getEntrySummary()
This property contains the Summary of the specified entry
within an OData feed. This value will be populated once EntryIndex
is set (provided that a Summary can be found).
public void setEntrySummary(java.lang.String entrySummary) throws IPWorksException
This property contains the Summary of the specified entry
within an OData feed. This value will be populated once EntryIndex
is set (provided that a Summary can be found).
IPWorksException
public java.lang.String getEntryTitle()
This property contains the Title of the specified entry
within an OData feed. This value will be populated once EntryIndex
is set (provided that a Title can be found).
public void setEntryTitle(java.lang.String entryTitle) throws IPWorksException
This property contains the Title of the specified entry
within an OData feed. This value will be populated once EntryIndex
is set (provided that a Title can be found).
IPWorksException
public java.lang.String getEntryUpdated()
This property contains the Date-Time when the specified entry
within an OData feed was updated. This value will be populated once EntryIndex
is set (provided that a Title can be found).
public java.lang.String getEntryXML()
This property contains the raw XML of the specified entry
within an OData feed. This value will be populated once EntryIndex
is set.
public void setEntryXML(java.lang.String entryXML) throws IPWorksException
This property contains the raw XML of the specified entry
within an OData feed. This value will be populated once EntryIndex
is set.
IPWorksException
public Firewall getFirewall()
This is a Firewall
type property which
contains fields describing the firewall
through which the bean will attempt to connect.
public void setFirewall(Firewall firewall) throws IPWorksException
This is a Firewall
type property which
contains fields describing the firewall
through which the bean will attempt to connect.
IPWorksException
public boolean isIdle()
Idle
will be False if the component is currently busy (communicating
and/or waiting for an answer), and True at all other times.
public java.lang.String getLocalHost()
The LocalHost
property contains the name of the local host
as obtained by the gethostname() system call, or if the
user has assigned an IP address, the value of that address.
In multi-homed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the bean initiate connections (or accept in the case of server beans) only through that interface.
If the bean is connected, the LocalHost
property shows
the IP address of the interface through which the connection
is made in internet dotted format (aaa.bbb.ccc.ddd). In most
cases, this is the address of the local host, except for multi-homed
hosts (machines with more than one IP interface).
NOTE: LocalHost
is not persistent. You must always set it in
code, and never in the property window.
public void setLocalHost(java.lang.String localHost) throws IPWorksException
The LocalHost
property contains the name of the local host
as obtained by the gethostname() system call, or if the
user has assigned an IP address, the value of that address.
In multi-homed hosts (machines with more than one IP interface) setting LocalHost to the value of an interface will make the bean initiate connections (or accept in the case of server beans) only through that interface.
If the bean is connected, the LocalHost
property shows
the IP address of the interface through which the connection
is made in internet dotted format (aaa.bbb.ccc.ddd). In most
cases, this is the address of the local host, except for multi-homed
hosts (machines with more than one IP interface).
NOTE: LocalHost
is not persistent. You must always set it in
code, and never in the property window.
IPWorksException
public java.lang.String getOtherHeaders()
This property can be set to a string of headers to be appended to the HTTP request headers created from other properties like ContentType
, From
, etc.
The headers must be of the format "header: value" as described in the HTTP specifications. Header lines should be separated by CRLF ("\\r\\n") .
Use this property with caution. If this property contains invalid headers, HTTP requests may fail.
This property is useful for extending the functionality of the bean beyond what is provided.
public void setOtherHeaders(java.lang.String otherHeaders) throws IPWorksException
This property can be set to a string of headers to be appended to the HTTP request headers created from other properties like ContentType
, From
, etc.
The headers must be of the format "header: value" as described in the HTTP specifications. Header lines should be separated by CRLF ("\\r\\n") .
Use this property with caution. If this property contains invalid headers, HTTP requests may fail.
This property is useful for extending the functionality of the bean beyond what is provided.
IPWorksException
public java.lang.String getOtherQueryOptions()
This property allows you to specify additional query options that will be used when accessing a service. Query options consist of name-value pairs and multiple entries should be separated with an '&' (i.e. name1=value1&name2=value2).
Note all specified values will be appended (unaltered) to the end of the URL (generated by the
combination of ServiceRootURI
, ResourcePath
and any Query*** properties specified).
public void setOtherQueryOptions(java.lang.String otherQueryOptions) throws IPWorksException
This property allows you to specify additional query options that will be used when accessing a service. Query options consist of name-value pairs and multiple entries should be separated with an '&' (i.e. name1=value1&name2=value2).
Note all specified values will be appended (unaltered) to the end of the URL (generated by the
combination of ServiceRootURI
, ResourcePath
and any Query*** properties specified).
IPWorksException
public HeaderList getParsedHeaders()
This property contains a collection of headers returned from the last request. Whenever headers are returned from the server, the headers are
parsed into a collection of headers. Each header
in this collection contains information describing that header.
MaxHeaders
can be used to control the maximum number of headers saved.
This collection is indexed from 0 to size - 1.
public java.lang.String getPassword()
This property contains a password if authentication is to be used. If AuthScheme
is set to HTTP Basic Authentication, The User
and Password
are Base64 encoded and the result is put in the Authorization
config setting in the form "Basic [encoded-user-password]".
If AuthScheme
is set to HTTP Digest Authentication, the User
and Password
properties are used to respond to the HTTP Digest Authentication challenge from the server.
If AuthScheme
is set to NTLM, NTLM authentication will be attempted. If AuthScheme
is set to NTLM and User
and Password
are empty, the bean will attempt to authenticate using the current user's credentials.
public void setPassword(java.lang.String password) throws IPWorksException
This property contains a password if authentication is to be used. If AuthScheme
is set to HTTP Basic Authentication, The User
and Password
are Base64 encoded and the result is put in the Authorization
config setting in the form "Basic [encoded-user-password]".
If AuthScheme
is set to HTTP Digest Authentication, the User
and Password
properties are used to respond to the HTTP Digest Authentication challenge from the server.
If AuthScheme
is set to NTLM, NTLM authentication will be attempted. If AuthScheme
is set to NTLM and User
and Password
are empty, the bean will attempt to authenticate using the current user's credentials.
IPWorksException
public Proxy getProxy()
This property contains fields describing the proxy through which the bean will attempt to connect.
public void setProxy(Proxy proxy) throws IPWorksException
This property contains fields describing the proxy through which the bean will attempt to connect.
IPWorksException
public java.lang.String getQueryFilter()
This property allows you to specify a filter (expression) in which only the entries that satisfy it will be returned.
Below are the operators supported in the expression language.
Logical Operators
Arithmetic Operators
Grouping Operators
Below are the functions supported in the expression language.
String Functions
Date Functions
Math Functions
Type Functions
public void setQueryFilter(java.lang.String queryFilter) throws IPWorksException
This property allows you to specify a filter (expression) in which only the entries that satisfy it will be returned.
Below are the operators supported in the expression language.
Logical Operators
Arithmetic Operators
Grouping Operators
Below are the functions supported in the expression language.
String Functions
Date Functions
Math Functions
Type Functions
IPWorksException
public java.lang.String getQueryOrderBy()
This property allows you to specify a value by which the returned entries
will be order after a call to QueryService
.
Note: You can specify the order by which the entries are sorted (either ascending or descending)
by appending " asc" or " desc" (respectively) to your OrderBy value. For example, if you want
to sort the entries by 'Rating' in descending order you would set QueryOrderBy
to "Rating desc".
If a specific order ('asc' or 'desc') is not specified, the entries will be returned in ascending order.
public void setQueryOrderBy(java.lang.String queryOrderBy) throws IPWorksException
This property allows you to specify a value by which the returned entries
will be order after a call to QueryService
.
Note: You can specify the order by which the entries are sorted (either ascending or descending)
by appending " asc" or " desc" (respectively) to your OrderBy value. For example, if you want
to sort the entries by 'Rating' in descending order you would set QueryOrderBy
to "Rating desc".
If a specific order ('asc' or 'desc') is not specified, the entries will be returned in ascending order.
IPWorksException
public java.lang.String getQuerySelect()
This property allows you to specify the specific properties you want returned within an entry
when calling QueryService
. The specified value should be a comma-separated list of properties
(provided you wish to have more than one property returned). For example, if you wish to only have
the 'Name' and 'Price' of each item returned you can set QuerySelect
to "Name,Price".
Note the specified values can be a property name, navigation property name ( Title ) or the "*" character (which returns all the properties for each entry).
public void setQuerySelect(java.lang.String querySelect) throws IPWorksException
This property allows you to specify the specific properties you want returned within an entry
when calling QueryService
. The specified value should be a comma-separated list of properties
(provided you wish to have more than one property returned). For example, if you wish to only have
the 'Name' and 'Price' of each item returned you can set QuerySelect
to "Name,Price".
Note the specified values can be a property name, navigation property name ( Title ) or the "*" character (which returns all the properties for each entry).
IPWorksException
public java.lang.String getQuerySkip()
This property allows you to specify the number of entries to skip (from the top of the list)
when calling QueryService
. Therefore when this property set, only the remaining entries
(starting with entry N+1) will be returned. The specified value should not be a value less
than 0.
By default, the service you are querying will sort the entries using a scheme selected by the
OData service you are querying. However you can use QueryOrderBy
to specify how the entries
should be sorted prior to skipping the top N items.
This property can be used in conjunction with QueryOrderBy
and QueryTop
to select specific
entries. For example, if you wanted to select the third and fourth highest rated item you would
set QueryOrderBy
to "Rating desc" (to order the items by Rating from highest to lowest), set QuerySkip
to "2" (to skip the first and second items), and finally set QueryTop
to "2"
(to only return the third and fourth items).
public void setQuerySkip(java.lang.String querySkip) throws IPWorksException
This property allows you to specify the number of entries to skip (from the top of the list)
when calling QueryService
. Therefore when this property set, only the remaining entries
(starting with entry N+1) will be returned. The specified value should not be a value less
than 0.
By default, the service you are querying will sort the entries using a scheme selected by the
OData service you are querying. However you can use QueryOrderBy
to specify how the entries
should be sorted prior to skipping the top N items.
This property can be used in conjunction with QueryOrderBy
and QueryTop
to select specific
entries. For example, if you wanted to select the third and fourth highest rated item you would
set QueryOrderBy
to "Rating desc" (to order the items by Rating from highest to lowest), set QuerySkip
to "2" (to skip the first and second items), and finally set QueryTop
to "2"
(to only return the third and fourth items).
IPWorksException
public java.lang.String getQuerySkipToken()
When a returned result collection is very large, it is not uncommon for the results
to be broken up into multiple pages. When this occurs a Skip Token is returned in the
response and the component will populate QuerySkipToken
with the returned value.
Calling QueryService
again will return the next page of results.
public void setQuerySkipToken(java.lang.String querySkipToken) throws IPWorksException
When a returned result collection is very large, it is not uncommon for the results
to be broken up into multiple pages. When this occurs a Skip Token is returned in the
response and the component will populate QuerySkipToken
with the returned value.
Calling QueryService
again will return the next page of results.
IPWorksException
public java.lang.String getQueryTop()
This property allows you to specify the number of entries (taken from the top of the list)
to be returned when calling QueryService
. The specified value should not be a value less
than 0.
By default, the service you are querying will sort the entries using a scheme selected by the
OData service you are querying. However you can use QueryOrderBy
to specify how the entries
should be sorted prior to selecting the top N items.
public void setQueryTop(java.lang.String queryTop) throws IPWorksException
This property allows you to specify the number of entries (taken from the top of the list)
to be returned when calling QueryService
. The specified value should not be a value less
than 0.
By default, the service you are querying will sort the entries using a scheme selected by the
OData service you are querying. However you can use QueryOrderBy
to specify how the entries
should be sorted prior to selecting the top N items.
IPWorksException
public java.lang.String getResourcePath()
This property contains the resource path of an OData service and
is used in conjunction with ServiceRootURI
( ServiceRootURI
/ ResourcePath
)
to query feeds and modify entries.
This property will be populated when EntryIndex
is set.
You can change the value if you wish to send the request to a different Resource Path.
For example, a valid ResourcePath
for the OData sample service is: "Products".
public void setResourcePath(java.lang.String resourcePath) throws IPWorksException
This property contains the resource path of an OData service and
is used in conjunction with ServiceRootURI
( ServiceRootURI
/ ResourcePath
)
to query feeds and modify entries.
This property will be populated when EntryIndex
is set.
You can change the value if you wish to send the request to a different Resource Path.
For example, a valid ResourcePath
for the OData sample service is: "Products".
IPWorksException
public ODataSchemaAssociation getSchemaAssociation()
This property is used to obtain the navigation properties and their corresponding associations contained
within an entity (specified by SchemaEntityIndex
) of a service schema. This property is populated
after setting SchemaAssociationIndex
.
public int getSchemaAssociationCount()
This property is updated to reflect the total number of navigation properties
within the schema entity specified by SchemaEntityIndex
.
public int getSchemaAssociationIndex()
This property is used to specify a navigation property within an entity
(specified by SchemaEntityIndex
). Once set, SchemaAssociation
will be populated.
public void setSchemaAssociationIndex(int schemaAssociationIndex) throws IPWorksException
This property is used to specify a navigation property within an entity
(specified by SchemaEntityIndex
). Once set, SchemaAssociation
will be populated.
IPWorksException
public ODataSchemaEntity getSchemaEntity()
This property is used to obtain the entities of a service schema.
This property is populated after setting SchemaEntityIndex
.
public int getSchemaEntityCount()
This property is updated to reflect the total number of entities
within a schema (retrieved via GetSchema
).
public int getSchemaEntityIndex()
This property is used to specify an entity within a retrieved OData schema.
Once set, SchemaEntity
will be populated.
public void setSchemaEntityIndex(int schemaEntityIndex) throws IPWorksException
This property is used to specify an entity within a retrieved OData schema.
Once set, SchemaEntity
will be populated.
IPWorksException
public java.lang.String[] getSchemaKeys()
This property is used to obtain the key(s) contained within an entity of a service schema
and is populated after setting SchemaEntityIndex
.
Note: A Key value maps to a property of the entity, details of which can be retrieved via SchemaProperty
.
public ODataSchemaProperty getSchemaProperty()
This property is used to obtain the properties contained within an entity (specified
by SchemaEntityIndex
) of a service schema. This property is populated after setting SchemaPropertyIndex
.
Note: In reference to a database structure, a property would be a column.
public int getSchemaPropertyCount()
This property is updated to reflect the total number of properties
within the schema entity specified by SchemaEntityIndex
.
public int getSchemaPropertyIndex()
This property is used to specify a property within an entity (specified by SchemaEntityIndex
).
Once set, SchemaProperty
will be populated.
public void setSchemaPropertyIndex(int schemaPropertyIndex) throws IPWorksException
This property is used to specify a property within an entity (specified by SchemaEntityIndex
).
Once set, SchemaProperty
will be populated.
IPWorksException
public ODataSchemaProperty getSchemaTypeField()
This property is used to obtain the fields (properties) contained within a complex type.
It is populated when navigating an entity's properties via SchemaPropertyIndex
or
by explicitly setting the complex type name via SetSchemaType
.
public int getSchemaTypeFieldCount()
This property is updated to reflect the total number of fields (properties)
within the schema complex type of a property. This is populated when
navigating an entity's properties via SchemaPropertyIndex
or by
explicitly setting the type via SetSchemaType
.
public int getSchemaTypeFieldIndex()
This property is used to specify a field (property) within a complex type.
Once set, SchemaTypeField
will be populated.
public void setSchemaTypeFieldIndex(int schemaTypeFieldIndex) throws IPWorksException
This property is used to specify a field (property) within a complex type.
Once set, SchemaTypeField
will be populated.
IPWorksException
public java.lang.String getServiceRootURI()
This property contains the root URI of an OData service.
This value is used in conjunction with ResourcePath
( ServiceRootURI
/ ResourcePath
)
to query feeds and modify entries.
For example, the ServiceRootURI
of the OData sample service is: "http://services.odata.org/OData/OData.svc/".
public void setServiceRootURI(java.lang.String serviceRootURI) throws IPWorksException
This property contains the root URI of an OData service.
This value is used in conjunction with ResourcePath
( ServiceRootURI
/ ResourcePath
)
to query feeds and modify entries.
For example, the ServiceRootURI
of the OData sample service is: "http://services.odata.org/OData/OData.svc/".
IPWorksException
public int getTimeout()
If the Timeout
property is set to 0, all operations
will run uninterrupted until successful completion or an error condition
is encountered.
If Timeout
is set to a positive value, the bean will
wait for the operation to complete before returning control.
The bean will use DoEvents
to enter an efficient wait loop
during any potential waiting period, making sure that all system events
are processed immediately as they arrive. This ensures that the host
application does not "freeze" and remains responsive.
If Timeout
expires, and the operation is not yet complete,
the bean throws an exception.
Please note that by default, all timeouts are inactivity timeouts ,
i.e. the timeout period is extended by Timeout
seconds when
any amount of data is successfully sent or received.
Optionally, the behavior of the bean may be changed to absolute timeouts , i.e. the bean will wait for a maximum
of Timeout
seconds since the beginning of the operation, without
extending the timeout period during communications.
This behavior is controlled by the AbsoluteTimeout
configuration setting.
The default value for the Timeout
property is 60 (seconds).
public void setTimeout(int timeout) throws IPWorksException
If the Timeout
property is set to 0, all operations
will run uninterrupted until successful completion or an error condition
is encountered.
If Timeout
is set to a positive value, the bean will
wait for the operation to complete before returning control.
The bean will use DoEvents
to enter an efficient wait loop
during any potential waiting period, making sure that all system events
are processed immediately as they arrive. This ensures that the host
application does not "freeze" and remains responsive.
If Timeout
expires, and the operation is not yet complete,
the bean throws an exception.
Please note that by default, all timeouts are inactivity timeouts ,
i.e. the timeout period is extended by Timeout
seconds when
any amount of data is successfully sent or received.
Optionally, the behavior of the bean may be changed to absolute timeouts , i.e. the bean will wait for a maximum
of Timeout
seconds since the beginning of the operation, without
extending the timeout period during communications.
This behavior is controlled by the AbsoluteTimeout
configuration setting.
The default value for the Timeout
property is 60 (seconds).
IPWorksException
public byte[] getTransferredData()
This property is used to get the data of the last response from the server.
TransferredData
will be populated after a successful QueryService
or CustomRequest
call,
provided that LocalFile
is not set. If LocalFile
is set, the object data will be written
to the file specified.
public java.lang.String getUser()
This property contains a user name if authentication is to be used. If AuthScheme
is set to HTTP Basic Authentication, The User
and Password
are Base64 encoded and the result is put in the Authorization
property in the form "Basic [encoded-user-password]".
If AuthScheme
is set to HTTP Digest Authentication, the User
and Password
properties are used to respond to the HTTP Digest Authentication challenge from the server.
If AuthScheme
is set to NTLM, NTLM authentication will be attempted. If AuthScheme
is set to NTLM and User
and Password
are empty, the bean will attempt to authenticate using the current user's credentials.
public void setUser(java.lang.String user) throws IPWorksException
This property contains a user name if authentication is to be used. If AuthScheme
is set to HTTP Basic Authentication, The User
and Password
are Base64 encoded and the result is put in the Authorization
property in the form "Basic [encoded-user-password]".
If AuthScheme
is set to HTTP Digest Authentication, the User
and Password
properties are used to respond to the HTTP Digest Authentication challenge from the server.
If AuthScheme
is set to NTLM, NTLM authentication will be attempted. If AuthScheme
is set to NTLM and User
and Password
are empty, the bean will attempt to authenticate using the current user's credentials.
IPWorksException
public XMLAttributeList getXAttributes()
This collection consists of all attributes of
the current XML element. The component parses
each attribute into a collection of xmlattribute
types.
This collection is indexed from 0 to size - 1.
public XMLElementList getXChildren()
The elements are provided in the collection in the same order they are found in the document.
This collection is indexed from 0 to size - 1.
public java.lang.String getXElement()
The current element is specified via the XPath
property.
public java.lang.String getXNamespace()
The current element is specified via the XPath
property.
public java.lang.String getXParent()
The current element is specified via the XPath
property.
public java.lang.String getXPath()
XPath
implements a subset of the XML XPath specification,
allowing you to point to specific elements in the XML documents.
The path is a series of one or more element accessors separated by '/'.
The path can be absolute (starting with '/') or relative to
the current XPath
location.
The following are possible values for an element accessor:
XPath
is set to a valid path, XElement
points to
the name of the element, with XParent
, XNamespace
, XPrefix
, XChildren
, and XText
providing other properties of the element.
The attributes of the current element are provided in the XAttributes
collection
.
Example (Setting XPath)
- Document root
- ODataControl.XPath = "/"
- Specific Element
- ODataControl.XPath = "/root/SubElement1/SubElement2/"
- i-th Child
- ODataControl.XPath = "/root/SubElement1[i]"
- Specific EntryItem
- ODataControl.XPath = ODataControl.EntryItems[i].XPath
public void setXPath(java.lang.String XPath) throws IPWorksException
XPath
implements a subset of the XML XPath specification,
allowing you to point to specific elements in the XML documents.
The path is a series of one or more element accessors separated by '/'.
The path can be absolute (starting with '/') or relative to
the current XPath
location.
The following are possible values for an element accessor:
XPath
is set to a valid path, XElement
points to
the name of the element, with XParent
, XNamespace
, XPrefix
, XChildren
, and XText
providing other properties of the element.
The attributes of the current element are provided in the XAttributes
collection
.
Example (Setting XPath)
- Document root
- ODataControl.XPath = "/"
- Specific Element
- ODataControl.XPath = "/root/SubElement1/SubElement2/"
- i-th Child
- ODataControl.XPath = "/root/SubElement1[i]"
- Specific EntryItem
- ODataControl.XPath = ODataControl.EntryItems[i].XPath
IPWorksException
public java.lang.String getXPrefix()
The current element is specified via the XPath
property.
public java.lang.String getXSubTree()
The current element is specified via the XPath
property. In order for this property to work you must have the CacheContent
set to true.
public java.lang.String getXText()
The current element is specified via the XPath
property.
public java.lang.String config(java.lang.String configurationString) throws IPWorksException
Config
is a generic method available in every bean.
It is used to set and retrieve configuration settings
for the
bean.
Configuration settings are similar in functionality to properties,
but they are rarely used. In order to avoid "polluting" the property
namespace of the bean, access to these internal properties is provided through the Config
method.
To set a configuration setting named PROPERTY , you must call Config("PROPERTY=VALUE") , where VALUE is the value of the setting expressed as a string. For boolean values, use the strings "True", "False", "0", "1", "Yes", or "No" (case does not matter).
To read (query) the value of a configuration setting, you must call Config("PROPERTY") . The value will be returned as a string.
The bean accepts one or more of the following configuration settings .
Configuration settings are similar in functionality to properties,
but they are rarely used. In order to avoid "polluting" the property
namespace of the bean, access to these internal properties is provided through the Config
method.
XPath
. However you can set this field to False, which will *not* build the internal object model thus
providing performance improvements. In this case, the Entry*** properties and XPath
cannot be used, however
the Entry
event will still be fired allowing you to retrieve the entry information.
AllowHTTPCompression
is true, the bean adds an "Accept-Encoding: " header to the request
being sent to the server. By default, this header's value is "gzip, deflate". This config allows you
to change the value of the "Accept-Encoding" header.
NOTE: The bean only supports gzip and deflate decompression algorithms.AllowHTTPCompression
property. This setting is exposed here
for use by beans that inherit from HTTP.Authorization
property contains a non-empty string,
an Authorization HTTP request header is added to the
request. This header conveys Authorization information to the
server.This property is provided so that the HTTP bean can be
extended with other security schemes in addition to the
authorization schemes already implemented by the bean.
The AuthScheme
property defines the authentication scheme used.
In the case of HTTP Basic Authentication (default), every time User
and Password
are set, they are Base64 encoded,
and the result is put in the Authorization property
in the form "Basic [encoded-user-password]".
Transfer
event, by BytesTransferred .IfModifiedSince
property. This setting is exposed here for use by beans that inherit from HTTP.OtherHeaders
to 'Connection: Keep-Alive'.
If false, the connection will be closed immediately after the server response is received.The default value for KeepAlive
is false.
TransferredHeaders
collection is to be populated
when a Header
event has been fired. This value
represents the number of headers that are to be saved in the collection.To save all items to the collection
, set this config to -1. If no
items are wanted, set this to 0, which will not save any to the
collection
. The default for this config is -1, so all items will
be included in the collection
.
NOTE: This functionality is only available in Java and .NET.
Cookies
collection
as a result of an HTTP request. This value represents the number of
cookies that are to be saved in the collection
.To save all items to the collection
, set this config to -1. If no
items are wanted, set this to 0, which will not save any to the
collection
. The default for this config is -1, so all items will
be included in the collection
.
NOTE: This functionality is only available in Java and .NET.
FollowRedirects
is set to any value besides frNever the bean will follow redirects until
this maximum number of redirect attempts are made. The default value is 20.
\011Authorization
config, but for proxy authorization. If this
config contains a non-empty string, a Proxy-Authorization HTTP request header is added
to the request. This header conveys proxy authorization information to the server. If User and Password are specified, this value is calculated using the algorithm specified
by AuthScheme .TransferredData
buffer.If TransferredDataLimit
is set to 0, no limits are imposed.
UseChunkedEncoding
is true. This setting specifies the
chunk size in bytes to be used when posting data. The default value is 16384.
FirewallHost
is given, requested connections will be authenticated through the specified firewall
when connecting.If the FirewallHost
setting is set to a Domain Name, a DNS request is initiated. Upon successful termination
of the request, the FirewallHost
setting is set to the corresponding address. If the search is not successful,
an error is returned.
NOTE: This is the same as Host . This setting is provided for use by beans that do not directly expose Firewall properties.
RemoteHost
and RemotePort
are used to tell the SOCKS firewall
in which address and port to listen to. The firewall rules may ignore RemoteHost
, and it is recommended that RemoteHost
be set to empty string in this case.
RemotePort
is the port in which the firewall will listen to. If set to 0, the firewall will select a random port. The
binding (address and port) is provided through the ConnectionStatus
event.
The connection to the firewall is made by calling the Connect
method.
FirewallHost
is specified, the FirewallUser
and FirewallPassword
settings
are used to connect and authenticate to the given firewall. If the authentication fails, the bean throws an exception.NOTE: This is the same as Password . This setting is provided for use by beans that do not directly expose Firewall properties.
FirewallPort
is set automatically when FirewallType
is set to a valid value.NOTE: This is the same as Port . This setting is provided for use by beans that do not directly expose Firewall properties.
FirewallPort
is set to 80.
FirewallPort
is set to 1080.
FirewallPort
is set to 1080.
FirewallHost
is specified, the FirewallUser
and FirewallPassword
settings are used to connect and authenticate to the Firewall. If the authentication fails, the bean throws an exception.NOTE: This is the same as User . This setting is provided for use by beans that do not directly expose Firewall properties.
TCPKeepAlive
will automatically be set to true.
By default the operating system will determine the
time a connection is idle before a TCP keep-alive packet is sent. This system default if this value is not specified here is 2 hours. In many
cases a shorter interval is more useful. Set this value to the desired interval in milliseconds.Note: This value is not applicable in Java.
TCPKeepAlive
will automatically be set to true.
A TCP keep-alive packet will be sent after a period of inactivity as
defined by KeepAliveTime
. If no acknowledgement is received from the remote host the keep-alive packet
will be re-sent. This setting specifies the interval at which the successive keep-alive packets are sent in milliseconds.
This system default if this value is not specified here is 1 second.Note: This value is not applicable in Java or MAC.
LingerTime
is 0 (default), the
system will attempt to send pending data for a connection until the default
IP protocol timeout expires.
In the second scenario, LingerTime
is a positive value, the system will
attempt to send pending data until the specified LingerTime
is reached.
If this attempt fails, then the system will reset the connection.
The default behavior (which is also the default mode for stream sockets) might result in a long delay in closing the connection. Although the bean returns control immediately, the system could hold system resources until all pending data is sent (even after your application closes).
Setting this property to False forces an immediate disconnection. If you know that the other side has received all the data you sent (by a client acknowledgment, for example), setting this property to False might be the appropriate course of action.
LocalHost
setting contains the name of the local host
as obtained by the gethostname() system call, or if the
user has assigned an IP address, the value of that address.In multi-homed hosts (machines with more than one IP interface)
setting LocalHost to the value of an interface will make the
bean initiate connections (or accept in the case of server
beans) only through that interface.
If the bean is connected, the LocalHost
setting shows
the IP address of the interface through which the connection
is made in internet dotted format (aaa.bbb.ccc.ddd). In most
cases, this is the address of the local host, except for multi-homed
hosts (machines with more than one IP interface).
LocalPort
after the connection is established.
LocalPort
cannot be changed once a connection is made.
Any attempt to set this when a connection is active will
generate an error.
This; setting is useful when trying to connect to services that require a trusted port in the client side. An example is the remote shell (rsh) service in UNIX systems.
MaxLineLength
is the size of an internal buffer, which holds received data while waiting for an EOL
string.If an EOL
string is found in the input stream before MaxLineLength
bytes are received, the DataIn
event is fired with the EOL parameter set to True, and the buffer is reset.
If no EOL
is found, and MaxLineLength
bytes are accumulated in the buffer, the DataIn
event is
fired with the EOL parameter set to False, and the buffer is reset.
The minimum value for MaxLineLength
is 256 bytes. The default value is 2048 bytes. The maximum value is 65536 bytes.
KeepAliveTime
and KeepAliveInterval
to
configure the timing of the keep-alive packets.Note: This value is not applicable in Java.
IPWorksException
public void createEntry() throws IPWorksException
The component will use the items contained within EntryProperties
to create a new entry within the feed service resource by ServiceRootURI
and ResourcePath
( ServiceRootURI
/ ResourcePath
).
Upon a successful creation, all previous entries contained by the component, prior
to the CreateEntry
call, will be cleared and replaced with the response entry data. EntryIndex
will then be set to 0 (the first entry within the response), populating
the EntryAuthor
, EntryETag
, EntryTitle
, EntrySummary
, EntryUpdated
, EntryLinks
, and EntryProperties
properties. OtherHeaders
will also be cleared
and thus will need to be reset accordingly with each call made.
IPWorksException
public void customRequest(java.lang.String HTTPMethod, java.lang.String URL, java.lang.String postData) throws IPWorksException
Sends a custom request to the specified URL. The type of request sent is determined by HTTPMethod (e.g. POST) and the data sent is determined by PostData . If a custom request does not require data to be sent, you can simply set the PostData parameter to an empty string. Note, all values specified are taken as entered.
OtherHeaders
can be used to specify any additional headers you would like
to be sent in the custom request.
The search results are delivered in the TransferredData
property, as well as through the Transfer
event. The
response headers can be retrieved via the TransferredHeaders
property as well as through the Header
event.
The bean will then attempt to parse the search results.
Upon successfully parsing the response, Channel
will
be set with their associated feed element values and EntryCount
will
be populated with the total number of entries contained within the feed. EntryIndex
will also be set to 1, thus populating EntryProperties
.
IPWorksException
public void deleteEntry() throws IPWorksException
The component will delete the entry, of an OData service resource,
specified by ServiceRootURI
and ResourcePath
( ServiceRootURI
/ ResourcePath
).
An "If-Match" header will be sent in the delete request with the value
contained within EntryETag
.
Upon a successful entry deletion, all previous entries contained by the component,
prior to the DeleteEntry call, will be cleared. OtherHeaders
will also be cleared
and thus will need to be reset accordingly with each call made.
IPWorksException
public java.lang.String getEntryProperty(java.lang.String XPath) throws IPWorksException
This method is intended for extending functionality of the OData bean and
will retrieve the value of the entry property specified by XPath . XPath is the XPath of the element or attribute according to the following convention: entry[x]/element@attribute . The @attribute part is optional.
When EntryIndex
is set to an index greater than or equal to zero, a relative
path can also be used: property or property@attribute .
When a relative path is specified, the value of the specified XPath will be returned for the entry identified by EntryIndex
.
entry[x] is the feed's xth entry (or any other root level child), where the indexer x starts at 1.
property is any child of the properties element, and attribute can be any attribute of that field.
If an attribute is not supplied, the GetEntryProperty
method
will return the text portion of property . For example:
\011ODataControl.GetEntryProperty("entry[5]/content/properties/ID")
\011ODataControl.GetEntryProperty("entry[5]/content/properties/ID@type")
Here is an example using a relative path to retrieve properties of the first feed entry:
\011ODataControl.EntryIndex = 1
\011ODataControl.GetEntryProperty("ID")
\011ODataControl.GetEntryProperty("ID@type")
\011ODataControl.GetEntryProperty("Address/State")
IPWorksException
public void getSchema() throws IPWorksException
This method will retrieve the schema (metadata document) of the service
specified by ServiceRootURI
.
Upon successful retrieval of the schema, you can set SchemaEntityIndex
to
retrieve the names of the entities contained within the schema along with their
keys, properties, and navigation properties.
If you wish to retrieve additional details about the schema, they can be retrieved via XPath
.
IPWorksException
public boolean hasXPath(java.lang.String xpath) throws IPWorksException
You can use the HasXPath
method to determine if a particular XPath exists before setting it with XPath
.
The XPath
property implements a subset of the XML XPath specification, allowing you to point to specific
elements in the document.
The path is a series of one or more element accessors separated by '/'.
The path can be absolute (starting with '/') or relative to
the current XPath
location.
Setting the XPath
property to an XPath that does not exist will cause an error.
IPWorksException
public void queryService() throws IPWorksException
Queries an OData feed specified by ServiceRootURI
and ResourcePath
( ServiceRootURI
/ ResourcePath
) using the query options specified in
the Query*** properties and OtherQueryOptions
. To fetch an OData feed,
without performing any filtering, you can leave Query*** and OtherQueryOptions
empty and call QueryService
.
The query results are delivered in the TransferredData
property, as well as through the Transfer
event. The
response headers can be retrieved via the ParsedHeaders
property as well as through the Header
event.
The bean will then attempt to parse the query results.
Upon successfully parsing the response, Channel
will
be set with their associated feed element values and EntryCount
will
be populated with the total number of entries contained within the feed. EntryIndex
will also be set to 1, thus populating EntryAuthor
, EntryETag
, EntryTitle
, EntrySummary
, EntryUpdated
, EntryLinks
, EntryProperties
and ResourcePath
.
IPWorksException
public void reset() throws IPWorksException
The Reset
method resets all properties to the bean's
default settings. This is an easy way to clear all of the property
values before repopulating the OData feed.
IPWorksException
public void setEntryProperty(java.lang.String XPath, java.lang.String value) throws IPWorksException
This method is intended for extending functionality of the OData bean and
will set the value of the entry property (specified by XPath ) to the specified Value .
Therefore the value of the corresponding property will be updated within EntryProperties
.
XPath is the XPath of the element or attribute according to the following convention: entry[x]/element .
When EntryIndex
is set to an index greater than or equal to zero, a relative
path can also be used: property .
When a relative path is specified, the bean will use the specified EntryIndex
along with the property specified to update the EntryProperty value.
entry[x] is the feed's xth entry (or any other root level child), where the indexer x starts at 1.
property is any child of the properties element. For example:
\011ODataControl.SetEntryProperty("entry[5]/content/properties/Name", "MyNewName")
Here is an example using a relative path to retrieve properties of the first feed entry:
\011ODataControl.EntryIndex = 1
\011ODataControl.SetEntryProperty("Name", "MyNewName")
\011ODataControl.SetEntryProperty("Address/State", "NC")
IPWorksException
public void setSchemaEntity(java.lang.String name) throws IPWorksException
The bean will set the schema entity to the Name specified.
Once set, you can view the keys (via SchemaKeys
), properties
(via SchemaProperty
) and navigation properties (via SchemaAssociation
)
contained within the specified entity.
IPWorksException
public void setSchemaProperty(java.lang.String name) throws IPWorksException
The bean will set the schema property to the Name specified.
Once set, you can view the details of the property (via SchemaProperty
)
along with the complex type details (via SchemaTypeField
); provided that
the property is derived from the complex type.
IPWorksException
public void setSchemaType(java.lang.String name) throws IPWorksException
The bean will set the schema type to the Name specified.
Once set, you can view the details of the complex type (via SchemaTypeField
).
IPWorksException
public void updateEntry() throws IPWorksException
The bean will update the OData entry specified by ServiceRootURI
and ResourcePath
( ServiceRootURI
/ ResourcePath
). It will update
the OData entry with the elements specified by EntryProperties
.
Upon a successful update, all previous entries contained by the component,
prior to the UpdateEntry
call, will be cleared and replaced with the
response entry data. EntryIndex
will then be set to 0 (the first entry
within the response), populating the EntryAuthor
, EntryETag
, EntryTitle
, EntrySummary
, EntryUpdated
, EntryLinks
, EntryProperties
and ResourcePath
properties. OtherHeaders
will also be cleared and thus
will need to be reset accordingly with each call made.
IPWorksException
public void updateProperty(java.lang.String XPath, java.lang.String value) throws IPWorksException
The bean will update the OData entry specified by ServiceRootURI
and ResourcePath
( ServiceRootURI
/ ResourcePath
). It will update
only the single entry property specified by XPath with the specified Value .
Upon a successful update, all previous entries contained by the component, prior to the UpdateProperty
call, will be cleared and replaced with the response entry data. EntryIndex
will then be set to 0 (the first entry within the response), populating
the EntryAuthor
, EntryETag
, EntryTitle
, EntrySummary
, EntryUpdated
, EntryLinks
, EntryProperties
and ResourcePath
. OtherHeaders
will also be
cleared and thus will need to be reset accordingly with each call made.
IPWorksException
public void addOdataEventListener(OdataEventListener l) throws java.util.TooManyListenersException
java.util.TooManyListenersException
public void removeOdataEventListener(OdataEventListener l)
|
IP*Works! V9 | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |