comet.publication

The comet.publication module provides factory functions fetching information about publications from the remote Publishing Server connection.

See also

Class CPublication

Instances of CPublication objects

Methods

comet.publication.getAllParameters()

Get all defined publication parameters.

Returns

The found elements

Return type

list[CParameter]

Available

CScript

publication::get_all_parameters

comet.publication.getAllPublicationTypes()

Get all defined publication types.

Returns

The found elements

Return type

list[CPublicationType]

Available

CScript

publication::get_publication_types

comet.publication.getAllWorkflowStates()

Get all defined workflow states.

Returns

The found elements

Return type

list[CWorkflowStatus]

Available

CScript

publication::get_workflow_states

comet.publication.getPublications(parentID='')

Get the sub elements of a publication, or all root elements.

Parameters

parentID (str) –

The ID of the publication to fetch children for.

  • Empty str: Fetch the root elements

Returns

The found elements

Return type

list[CPublication]

Available

CScript

publication::get_subnodes

comet.publication.getParameters(documentID)

Get the parameters of a document.

Parameters

documentID (str) – The ID of the document

Returns

The parameters as key/values in a dict

Return type

dict[str, str]

Raises
Available

CScript

publication::get_parameters

comet.publication.getWorkflowStates(documentID)

Get the workflow states of a document.

Parameters

documentID (str) – The ID of the document

Returns

The states for the document

Return type

list[CWorkflowStatus]

Raises
Available

CScript

publication::get_document_workflow_states

comet.publication.getWorkflowStatus(documentID)

Get the current workflow status of a document.

Parameters

documentID (str) – The ID of the document

Returns

The current state of the document

Return type

CWorkflowStatus

Raises
Available

CScript

publication::get_document_workflow_status

comet.publication.getProductPlanning(documentID, entityID='', searchStr='', mappingFlag=0)

Get a list of products scheduled for the provided document.

Parameters
  • documentID (str) – The ID of the document

  • entityID (str) – Limit to products of this entity type

  • searchStr (str) – Limit to products matching the given search criteria

  • mappingFlag (int) –

    Flag for mapping

    • 0 : Use IDs of the planned Bucket

    • 1 : Use IDs of the Planning record

    • 2 : Use IDs of planned Bucket and ID of the Planning record as parent

Returns

List of planned products

Return type

list[CProduct]

Raises
  • TypeError – When parameter types are invalid

  • ValueError

    • When parameter documentID is empty

    • When parameter mappingFlag has invalid value

  • CometError – On internal error

Available

CScript

publication::get_document_product_planning

comet.publication.fromXMLStringList(xml)

Create a list of str from an XML string

Parameters

xml (str) – The XML representation of this object

Returns

The constructed object

Return type

list[str]

Raises
Available

CScript

stringlist::from_xml

comet.publication.fromXMLFloatList(xml)

Create a list of float from an XML string

Parameters

xml (str) – The XML representation of this object

Returns

The constructed object

Return type

list[float]

Raises
Available

CScript

floatlist::from_xml

comet.publication.fromXMLIntList(xml)

Create a list of ints from an XML string

Parameters

xml (str) – The XML representation of this object

Returns

The constructed object

Return type

list[int]

Raises
Available

CScript

list::from_xml

comet.publication.fromXMLKeyValueList(xml)

Create a dict of [str, str] from an XML string

Parameters

xml (str) – The XML representation of this object

Returns

The constructed object

Return type

dict[str, str]

Raises
Available

CScript

keyvalues::from_xml

comet.publication.fromXMLElement(xml)

Create a CElement object from an XML string

Parameters

xml (str) – The XML representation of this object

Returns

The constructed object

Return type

CElement

Raises
Available

CScript

element::from_xml

comet.publication.fromXMLElementList(xml)

Create a list of CElement from an XML string

Parameters

xml (str) – The XML representation of this object

Returns

The constructed object

Return type

list[CElement]

Raises
Available

CScript

elementlist::from_xml

comet.publication.fromXMLIDType(xml)

Create a CIDType object from an XML string

Parameters

xml (str) – The XML representation of this object

Returns

The constructed object

Return type

CIDType

Raises
Available

CScript

idtype::from_xml

comet.publication.fromXMLIDTypeList(xml)

Create a list of CIDType from an XML string

Parameters

xml (str) – The XML representation of this object

Returns

The constructed object

Return type

list[CIDType]

Raises
Available

CScript

idtypelist::from_xml

comet.publication.fromXMLParameter(xml)

Create a CParameter object from an XML string

Parameters

xml (str) – The XML representation of this object

Returns

The constructed object

Return type

CParameter

Raises
Available

CScript

publication::parameter::to_xml

comet.publication.fromXMLParameterList(xml)

Create a list of CParameter from an XML string

Parameters

xml (str) – The XML representation of this object

Returns

The constructed object

Return type

list[CParameter]

Raises
Available

CScript

publication::parameterlist::from_xml

comet.publication.fromXMLPlanning(xml)

Create a CPlanning object from an XML string

Parameters

xml (str) – The XML representation of this object

Returns

The constructed object

Return type

CPlanning

Raises
Available

CScript

publication::planning::from_xml

comet.publication.fromXMLPlanningList(xml)

Create a list of CPlanning from an XML string

Parameters

xml (str) – The XML representation of this object

Returns

The constructed object

Return type

list[CPlanning]

Raises
Available

CScript

publication::planninglist::from_xml

comet.publication.fromXMLProduct(xml)

Create a CProduct object from an XML string

Parameters

xml (str) – The XML representation of this object

Returns

The constructed object

Return type

CProduct

Raises
Available

CScript

product::from_xml

comet.publication.fromXMLProductList(xml)

Create a list of CProduct from an XML string

Parameters

xml (str) – The XML representation of this object

Returns

The constructed object

Return type

list[CProduct]

Raises
Available

CScript

productlist::from_xml

comet.publication.fromXMLPublication(xml)

Create a CPublication object from an XML string

Parameters

xml (str) – The XML representation of this object

Returns

The constructed object

Return type

CPublication

Raises
Available

CScript

publication::from_xml

comet.publication.fromXMLPublicationList(xml)

Create a list of CPublication from an XML string

Parameters

xml (str) – The XML representation of this object

Returns

The constructed object

Return type

list[CPublication]

Raises
Available

CScript

publication::publicationlist::from_xml

comet.publication.fromXMLPublicationType(xml)

Create a CPublicationType object from an XML string

Parameters

xml (str) – The XML representation of this object

Returns

The constructed object

Return type

CPublicationType

Raises
Available

CScript

publication::publicationtype::from_xml

comet.publication.fromXMLPublicationTypeList(xml)

Create a list of CPublicationType from an XML string

Parameters

xml (str) – The XML representation of this object

Returns

The constructed object

Return type

list[CPublicationType]

Raises
Available

CScript

publication::publicationtypelist::from_xml

comet.publication.fromXMLWorkflowStatus(xml)

Create a CWorkflowStatus object from an XML string

Parameters

xml (str) – The XML representation of this object

Returns

The constructed object

Return type

CWorkflowStatus

Raises
Available

CScript

publication::workflowstatus::from_xml

comet.publication.fromXMLWorkflowStatusList(xml)

Create a list of CWorkflowStatus from an XML string

Parameters

xml (str) – The XML representation of this object

Returns

The constructed object

Return type

list[CWorkflowStatus]

Raises
Available

CScript

publication::workflowstatuslist::from_xml

comet.publication.toXMLStringList(input, rootElementName='strings')

Generate the XML structure of a list of strings.

Parameters
  • input (list[str]) – The strings

  • rootElementName (str) – Name of the root element

Returns

The XML string representation of this object

Return type

str

Raises
  • TypeError – When parameter types are invalid

  • ValueError

    • When parameter input contains invalid values

    • When parameter rootElementName is empty

Available

CScript

stringlist::to_xml

comet.publication.toXMLFloatList(input, rootElementName='floats')

Generate the XML structure of a list of floats.

Parameters
  • input (list[float]) – The floats

  • rootElementName (str) – Name of the root element

Returns

The XML string representation of this object

Return type

str

Raises
  • TypeError – When parameter types are invalid

  • ValueError

    • When parameter input contains invalid values

    • When parameter rootElementName is empty

Available

CScript

floatlist::to_xml

comet.publication.toXMLIntList(input, rootElementName='integers')

Generate the XML structure of a list of ints.

Parameters
  • input (list[int]) – The ints

  • rootElementName (str) – Name of the root element

Returns

The XML string representation of this object

Return type

str

Raises
  • TypeError – When parameter types are invalid

  • ValueError

    • When parameter input contains invalid values

    • When parameter rootElementName is empty

Available

CScript

list::to_xml

comet.publication.toXMLKeyValueList(input, rootElementName='keyvalues')

Generate the XML structure of a a key value dict

Parameters
  • input (dict[str, str]) – The key/values

  • rootElementName (str) – Name of the root element

Returns

The XML string representation of this object

Return type

str

Raises
  • TypeError – When parameter types are invalid

  • ValueError

    • When parameter input contains invalid values

    • When parameter rootElementName is empty

Available

CScript

keyvalues::to_xml

comet.publication.toXMLElement(element, rootElementName='element')

Generate the XML structure of a CElement object

Parameters
  • element (CElement) – The element

  • rootElementName (str) – Name of the root element

Returns

The XML string representation of this object

Return type

str

Raises
  • TypeError – When parameter types are invalid

  • ValueError – When parameter rootElementName is empty

Available

CScript

element::to_xml

comet.publication.toXMLElementList(input, rootElementName='elements')

Generate the XML structure of a list of CElement

Parameters
  • input (list[CElement]) – The elements

  • rootElementName (str) – Name of the root element

Returns

The XML string representation of this object

Return type

str

Raises
  • TypeError – When parameter types are invalid

  • ValueError

    • When parameter input contains invalid values

    • When parameter rootElementName is empty

Available

CScript

elementlist::to_xml

comet.publication.toXMLIDType(IDType, rootElementName='recordid')

Generate the XML structure of this object.

Parameters
  • IDType (CIDType) – The ID type

  • rootElementName (str) – Name of the root element

Returns

The XML string representation of this object

Return type

str

Raises
  • TypeError – When parameter types are invalid

  • ValueError – When parameter rootElementName is empty

Available

CScript

idtype::to_xml

comet.publication.toXMLIDTypeList(input, rootElementName='recordids')

Generate the XML structure of a list of CIDType.

Parameters
  • input (list[CIDType]) – The IDs

  • rootElementName (str) – Name of the root element

Returns

The XML string representation of this object

Return type

str

Raises
  • TypeError – When parameter types are invalid

  • ValueError

    • When parameter input contains invalid values

    • When parameter rootElementName is empty

Available

CScript

idtypelist::to_xml

comet.publication.toXMLParameter(parameter, rootElementName='parameter')

Generate the XML structure of a CParameter.

Parameters
  • parameter (CParameter) – The parameter

  • rootElementName (str) – Name of the root element

Returns

The XML string representation of this object

Return type

str

Raises
  • TypeError – When parameter types are invalid

  • ValueError – When parameter rootElementName is empty

Available

CScript

publication::parameter::to_xml

comet.publication.toXMLParameterList(input, rootElementName='parameters')

Generate the XML structure of a list of CParameter.

Parameters
  • input (list[CParameter]) – The parameters

  • rootElementName (str) – Name of the root element

Returns

The XML string representation of this object

Return type

str

Raises
  • TypeError – When parameter types are invalid

  • ValueError

    • When parameter input contains invalid values

    • When parameter rootElementName is empty

Available

CScript

publication::parameterlist::to_xml

comet.publication.toXMLPlanning(planning, rootElementName='planning')

Generate the XML structure of a CPlanning object

Parameters
  • planning (CPlanning) – The planning

  • rootElementName (str) – Name of the root element

Returns

The XML string representation of this object

Return type

str

Raises
  • TypeError – When parameter types are invalid

  • ValueError – When parameter rootElementName is empty

Available

CScript

publication::planning::to_xml

comet.publication.toXMLPlanningList(input, rootElementName='plannings')

Generate the XML structure of a list of CPlanning.

Parameters
  • input (list[CPlanning]) – The plannings

  • rootElementName (str) – Name of the root element

Returns

The XML string representation of this object

Return type

str

Raises
  • TypeError – When parameter types are invalid

  • ValueError

    • When parameter input contains invalid values

    • When parameter rootElementName is empty

Available

CScript

publication::planninglist::to_xml

comet.publication.toXMLProduct(product, rootElementName='product')

Generate the XML structure of a CProduct object

Parameters
  • product (CProduct) – The product

  • rootElementName (str) – Name of the root element

Returns

The XML string representation of this object

Return type

str

Raises
  • TypeError – When parameter types are invalid

  • ValueError – When parameter rootElementName is empty

Available

CScript

product::to_xml

comet.publication.toXMLProductList(input, rootElementName='products')

Generate the XML structure of a list of CProduct.

Parameters
  • input (list[CProduct]) – The products

  • rootElementName (str) – Name of the root element

Returns

The XML string representation of this object

Return type

str

Raises
  • TypeError – When parameter types are invalid

  • ValueError

    • When parameter input contains invalid values

    • When parameter rootElementName is empty

Available

CScript

productlist::to_xml

comet.publication.toXMLPublication(publication, rootElementName='publication')

Generate the XML structure of a CPublication object

Parameters
  • publication (CPublication) – The publication

  • rootElementName (str) – Name of the root element

Returns

The XML string representation of this object

Return type

str

Raises
  • TypeError – When parameter types are invalid

  • ValueError – When parameter rootElementName is empty

Available

CScript

publication::to_xml

comet.publication.toXMLPublicationList(input, rootElementName='publications')

Generate the XML structure of a list of CPublication.

Parameters
  • input (list[CPublication]) – The publications

  • rootElementName (str) – Name of the root element

Returns

The XML string representation of this object

Return type

str

Raises
  • TypeError – When parameter types are invalid

  • ValueError

    • When parameter input contains invalid values

    • When parameter rootElementName is empty

Available

CScript

publication::publicationlist::to_xml

comet.publication.toXMLPublicationType(publicationType, rootElementName='publicationtype')

Generate the XML structure of a CPublicationType object

Parameters
  • publicationType (CPublicationType) – The publication type

  • rootElementName (str) – Name of the root element

Returns

The XML string representation of this object

Return type

str

Raises
  • TypeError – When parameter types are invalid

  • ValueError – When parameter rootElementName is empty

Available

CScript

publication::publicationtype::to_xml

comet.publication.toXMLPublicationTypeList(input, rootElementName='publicationtypes')

Generate the XML structure of a list of CPublication.

Parameters
Returns

The XML string representation of this object

Return type

str

Raises
  • TypeError – When parameter types are invalid

  • ValueError

    • When parameter input contains invalid values

    • When parameter rootElementName is empty

Available

CScript

publication::publicationtypelist::to_xml

comet.publication.toXMLWorkflowStatus(workflowStatus, rootElementName='workflowstatus')

Generate the XML structure of a CWorkflowStatus object

Parameters
  • workflowStatus (CWorkflowStatus) – The workflow status

  • rootElementName (str) – Name of the root element

Returns

The XML string representation of this object

Return type

str

Raises
  • TypeError – When parameter types are invalid

  • ValueError – When parameter rootElementName is empty

Available

CScript

publication::workflowstatus::to_xml

comet.publication.toXMLWorkflowStatusList(input, rootElementName='workflowstates')

Generate the XML structure of a list of CWorkflowStatus.

Parameters
Returns

The XML string representation of this object

Return type

str

Raises
  • TypeError – When parameter types are invalid

  • ValueError

    • When parameter input contains invalid values

    • When parameter rootElementName is empty

Available

CScript

publication::workflowstatuslist::to_xml