Chapter 8. API

Table of Contents

1. Gentics .Node PortalConnector WebService API
1.1. Service URLs
1.2. Service Methods
1.2.1. getObjects(rule,attributeNames,start,count,sortColumns)
1.2.2. getCount(rule)
1.2.3. getObjectsByID(ids,attributeNames,start,count,sortColumns)
1.2.4. getObject(id,attributeNames)
1.2.5. getAttribute(objectId,attributeName)
1.3. Objects
1.3.1. SimpleWSObject
1.3.2. SimpleWSAttribute
1.3.3. Sorting
2. Gentics Portal.Node SDK Java API
3. Gentics .Node PortalConnector Java API
4. Gentics Portal.Node AJAX request API

1. Gentics .Node PortalConnector WebService API

The Gentics .Node PortalConnector WebService API can be used to read data from the Gentics .Node ContentRepository using WebServices. This section describes the accessible service methods and the properties of used objects.

1.1. Service URLs

The URL to get the *.wsdl is http://[hostname]:[port]/Portal.Node/ws/services/datasource?wsdl . Where hostname is the server hostname, port the server port. To access a specific datasource, add the datasourceid to construct an URL like http://[hostname]:[port]/Portal.Node/ws/services/datasource/[datasourceid] .

1.2. Service Methods

1.2.1. getObjects(rule,attributeNames,start,count,sortColumns)

Get all objects from the datasource that match the given rule. Returns an array of SimpleWSObjects.

Table 8.1. Parameters for method getObjects()

NameTypeDescription
ruleStringFilter rule to filter returned objects
attributeNamesArray of StringsArray of attribute names of the prefetched attributes
startIntegerIndex of the first returned object (starting with 0)
countInteger Maximum number of returned objects (-1 for all objects)
sortColumnsArray of SortingOptional sorting, may be null or empty for no sorting

1.2.2. getCount(rule)

Get the number of objects that match the given rule. Returns an Integer.

Table 8.2. Parameters for method getCount()

NameTypeDescription
ruleStringFilter rule to filter counted objects

1.2.3. getObjectsByID(ids,attributeNames,start,count,sortColumns)

Get all objects from the datasource with given ids. Returns an array of SimpleWSObjects.

Table 8.3. Parameters for method getObjectsByID()

NameTypeDescription
idsArray of StringsIds of the objects to fetch
attributeNamesArray of StringsArray of attribute names of the prefetched attributes
startIntegerIndex of the first returned object (starting with 0)
countInteger Maximum number of returned objects (-1 for all objects)
sortColumnsArray of SortingOptional sorting, may be null or empty for no sorting

1.2.4. getObject(id,attributeNames)

Get a single object with the given id. Returns a SimpleWSObject.

Table 8.4. Parameters for method getObject()

NameTypeDescription
idStringId of the object to fetch
attributeNamesArray of StringsArray of attribute names of the prefetched attributes

1.2.5. getAttribute(objectId,attributeName)

Get an attribute for the given object. Returns a SimpleWSAttribute.

Table 8.5. Parameters for method getAttribute()

NameTypeDescription
objectIdStringId of the object
attributeNameStringName of the attribute

1.3. Objects

1.3.1. SimpleWSObject

The SimpleWSObject represents a single object.

Table 8.6. Properties of SimpleWSObject

NameTypeDescription
idStringId of the object
attributesArray of SimpleWSAttribute Array of all attributes that are prefetched for this object. Additional attributes can be fetched using “getAttribute(objectId,attributeName)” (Section 1.2.5) .

1.3.2. SimpleWSAttribute

The SimpleWSAttribute represents an attribute of a SimpleWSObject.

Table 8.7. Properties of SimpleWSAttribute

NameTypeDescription
nameStringName of the attribute
typeString Datatype of the attribute. Is one of ( stringValue , integerValue , longValue , doubleValue , dateValue , objectValue , binaryValue , multiStringValue , multiIntegerValue , multiLongValue , multiDoubleValue , multiDateValue , multiObjectValue , multiBinaryValue ). Access the property with this name to get the attribute value.
(Value of property type ) (Various)Value of the attribute.

1.3.3. Sorting

The Sorting represents sorting information.

Table 8.8. Properties of Sorting

NameTypeDescription
columnNameStringName of the sorted column (attribute)
sortOrderInteger Sort order. Use 1 for ascending and 2 for descending.