Class: CrossReferenceBean

structure. CrossReferenceBean


new CrossReferenceBean()

Extends

Methods


createStructureQuery( [detail] [, references])

Creates a {bean.StructureQuery|Structure Query} from this URN

Parameters:
Name Type Argument Default Description
detail string <optional>
full

Possible values are: "allstubs" (all artefacts should be returned as stubs), "referencestubs" (referenced artefacts should be returned as stubs) and "full" (all available information for all artefacts should be returned)

references string <optional>
none

Possible values are: "none" (no references will be returned), "parents" (the artefacts that use the artefact matching the query), "parentsandsiblings" (the artefacts that use the artefact matching the query, as well as the artefacts referenced by these artefacts), "children" (artefacts referenced by the artefact to be returned), "descendants" (references of references, up to any level, will also be returned), "all" (the combination of parentsandsiblings and descendants)

Inherited From:
Returns:
Type
bean.StructureQuery

getAgencyId()

Returns the Agency Id of the Structure (this is contained in the URN)

Inherited From:
Returns:
Type
string

getId()

Returns the Maintainable Id of the structure (this is contained in the URN)

Inherited From:
Returns:
Type
string

getIdentifiableId()

Returns the Identifiable Id of the structure, or null if there is none (this is contained in the URN)

Inherited From:
Returns:
Type
string

getShortUrn()

Returns the shorteded URN as a String.

A shortened URN is everything that appears after the "="

Inherited From:
Returns:
Type
string

getStructure()

Returns the IdentifiableBean to which this CrossReferenceBean is linking to.

If this CrossReference has not been resolved, then the structure will be resolved before being returned

Returns:
Type
bean.base.IdentifiableBean

getStructureType( [getClass])

Returns the structure type of the structure (this is contained in the URN)

Parameters:
Name Type Argument Description
getClass boolean <optional>

if true, this will return the JavaScript class instead

Inherited From:
Returns:
Type
string

getUrn()

Returns the full URN as a String. The URN is generated on the server based on the properties of the structure. The URN does not change over time, so it can be used to uniquely identify a structure in a consistent way

Inherited From:
Returns:
Type
string

getVersion()

Returns the Maintainable version of the structure (this is contained in the URN)

Inherited From:
Returns:
Type
string

isResolved()

Returns true if this Cross Reference contains the resolved structure.

If this CrossReferenceBean does contain the resolved structure, the call to getStructure will return the IdentifiableBean
which is being referenced, if not, the structure can be resolved by calling resolveStructure

Returns:
Type
boolean

resolveStructure(callback [, references])

Resolves the cross reference by obtaining the structure from the server.

The resolved IdentifiableBean will be passed into the callback function, if references are set then the
callback function will be passed a BeansContainer which will contain all the resolved structures

Parameters:
Name Type Argument Default Description
callback function

a callback function which is passed the resolved IdentifiableBean, or if reference resolution is enabled, a BeansContainer

references string <optional>
null

reference resolution. Possible values are: "none" (no references will be returned), "parents" (the artefacts that use the artefact matching the query), "parentsandsiblings" (the artefacts that use the artefact matching the query, as well as the artefacts referenced by these artefacts), "children" (artefacts referenced by the artefact to be returned), "descendants" (references of references, up to any level, will also be returned), "all" (the combination of parentsandsiblings and descendants)