Cubic Compass Software

- Support Wiki

The XOS eXtensible Object Store is the database for persisting Cubic Compass objects. XOS is a hierarchical object oriented data store that requires no database schema changes to support object types and properties.

Many commonly used objects are precreated ( See online API for a list of all object types ). The extensibility of XOS allows for the replication and synchronization with any 3rd party system for developing portal and enterprise mash-up applications.

The generic base class for all XOS objects is named PortalObject. All objects that inherit from PortalObject have access to the built-in role based security system and get/set property methods.

Every object has a globally unique identifier (called a Guid). Portal Objects are constructed using their object Guid. Guids are often passed to web pages using the "oid" parameter in the URL. For example (using Python syntax Dialogue Script):


objectID = System.Guid(Request.Params["oid"])
myObject = PortalObject(objectID)
firstName = myObject.GetProperty("FirstName")

if myObject.UserCanEdit(CurrentUser):
    myObject.SetProperty("FirstName", firstName + "_appended")


If the FirstName property does not exist on the generic object being constructed, then an empty string is returned. Likewise, SetProperty attaches any name/pair value to any object, regardless if the object has a predefined property for "FirstName".

Referring to properties indirectly through the GetProperty/SetProperty interface is common with late-bound integration with 3rd party systems, such as Salesforce.com CRM. But it is often more convenient to write code using predefined class names and properties. Several prebuilt class structures are already defined. These classes also include several methods.

Edit

Creating XOS Objects

XOS objects are managed in a hierarchical tree, commonly referred to as the "object graph". The Create() method on the generic PortalObject class accepts an objectID for the parent node within the graph where the object is to be stored.

newComment = Comment()
newComment.Create(CurrentView.ObjectID)
newComment.Body = "This page looks great"
newComment.ProfileID = CurrentUser.ProfileID

Moving objects within the graph is easily accomplished by changing the ParentID property.

newComment.ParentID = newGuid

Setting properties is automatically persisted. No Save() operation is required.

Edit

Deleting XOS Objects

The Delete() method on PortalObject executes a cascading delete of the current object and all child objects within the object graph.

discussion = Discussion(discussionID)
discussion.Delete() # deletes the current Discussion object and all child Category, Topic, and Comment objects within the graph

ScrewTurn Wiki version 2.0.35. Some of the icons created by FamFamFam.