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
- Available
- CScript
- comet.publication.getAllPublicationTypes()¶
Get all defined publication types.
- Returns
The found elements
- Return type
- Available
- CScript
- comet.publication.getAllWorkflowStates()¶
Get all defined workflow states.
- Returns
The found elements
- Return type
- Available
- CScript
- 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
- Available
- CScript
- 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
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter documentID is empty
CometError – On internal error
- Available
- CScript
- 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
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter documentID is empty
CometError – On internal error
- Available
- CScript
- 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
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter documentID is empty
CometError – On internal error
- Available
- CScript
- 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
- Raises
TypeError – When parameter types are invalid
When parameter documentID is empty
When parameter mappingFlag has invalid value
CometError – On internal error
- Available
- CScript
- 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
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter xml is empty
CometError – On internal error
- Available
- CScript
- 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
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter xml is empty
CometError – On internal error
- Available
- CScript
- 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
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter xml is empty
CometError – On internal error
- Available
- CScript
- 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
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter xml is empty
CometError – On internal error
- Available
- CScript
- 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
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter xml is empty
CometError – On internal error
- Available
- CScript
- 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
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter xml is empty
CometError – On internal error
- Available
- CScript
- 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
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter xml is empty
CometError – On internal error
- Available
- CScript
- 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
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter xml is empty
CometError – On internal error
- Available
- CScript
- 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
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter xml is empty
CometError – On internal error
- Available
- CScript
- 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
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter xml is empty
CometError – On internal error
- Available
- CScript
- 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
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter xml is empty
CometError – On internal error
- Available
- CScript
- 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
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter xml is empty
CometError – On internal error
- Available
- CScript
- 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
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter xml is empty
CometError – On internal error
- Available
- CScript
- 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
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter xml is empty
CometError – On internal error
- Available
- CScript
- 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
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter xml is empty
CometError – On internal error
- Available
- CScript
- 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
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter xml is empty
CometError – On internal error
- Available
- CScript
- 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
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter xml is empty
CometError – On internal error
- Available
- CScript
- 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
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter xml is empty
CometError – On internal error
- Available
- CScript
- 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
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter xml is empty
CometError – On internal error
- Available
- CScript
- 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
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter xml is empty
CometError – On internal error
- Available
- CScript
- comet.publication.toXMLStringList(input, rootElementName='strings')¶
Generate the XML structure of a list of strings.
- Parameters
- Returns
The XML string representation of this object
- Return type
- Raises
TypeError – When parameter types are invalid
When parameter input contains invalid values
When parameter rootElementName is empty
- Available
- CScript
- comet.publication.toXMLFloatList(input, rootElementName='floats')¶
Generate the XML structure of a list of floats.
- Parameters
- Returns
The XML string representation of this object
- Return type
- Raises
TypeError – When parameter types are invalid
When parameter input contains invalid values
When parameter rootElementName is empty
- Available
- CScript
- comet.publication.toXMLIntList(input, rootElementName='integers')¶
Generate the XML structure of a list of ints.
- Parameters
- Returns
The XML string representation of this object
- Return type
- Raises
TypeError – When parameter types are invalid
When parameter input contains invalid values
When parameter rootElementName is empty
- Available
- CScript
- comet.publication.toXMLKeyValueList(input, rootElementName='keyvalues')¶
Generate the XML structure of a a key value dict
- Parameters
- Returns
The XML string representation of this object
- Return type
- Raises
TypeError – When parameter types are invalid
When parameter input contains invalid values
When parameter rootElementName is empty
- Available
- CScript
- comet.publication.toXMLElement(element, rootElementName='element')¶
Generate the XML structure of a CElement object
- Parameters
- Returns
The XML string representation of this object
- Return type
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter rootElementName is empty
- Available
- CScript
- comet.publication.toXMLElementList(input, rootElementName='elements')¶
Generate the XML structure of a list of CElement
- Parameters
- Returns
The XML string representation of this object
- Return type
- Raises
TypeError – When parameter types are invalid
When parameter input contains invalid values
When parameter rootElementName is empty
- Available
- CScript
- comet.publication.toXMLIDType(IDType, rootElementName='recordid')¶
Generate the XML structure of this object.
- Parameters
- Returns
The XML string representation of this object
- Return type
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter rootElementName is empty
- Available
- CScript
- comet.publication.toXMLIDTypeList(input, rootElementName='recordids')¶
Generate the XML structure of a list of CIDType.
- Parameters
- Returns
The XML string representation of this object
- Return type
- Raises
TypeError – When parameter types are invalid
When parameter input contains invalid values
When parameter rootElementName is empty
- Available
- CScript
- 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
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter rootElementName is empty
- Available
- CScript
- 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
- Raises
TypeError – When parameter types are invalid
When parameter input contains invalid values
When parameter rootElementName is empty
- Available
- CScript
- comet.publication.toXMLPlanning(planning, rootElementName='planning')¶
Generate the XML structure of a CPlanning object
- Parameters
- Returns
The XML string representation of this object
- Return type
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter rootElementName is empty
- Available
- CScript
- comet.publication.toXMLPlanningList(input, rootElementName='plannings')¶
Generate the XML structure of a list of CPlanning.
- Parameters
- Returns
The XML string representation of this object
- Return type
- Raises
TypeError – When parameter types are invalid
When parameter input contains invalid values
When parameter rootElementName is empty
- Available
- CScript
- comet.publication.toXMLProduct(product, rootElementName='product')¶
Generate the XML structure of a CProduct object
- Parameters
- Returns
The XML string representation of this object
- Return type
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter rootElementName is empty
- Available
- CScript
- comet.publication.toXMLProductList(input, rootElementName='products')¶
Generate the XML structure of a list of CProduct.
- Parameters
- Returns
The XML string representation of this object
- Return type
- Raises
TypeError – When parameter types are invalid
When parameter input contains invalid values
When parameter rootElementName is empty
- Available
- CScript
- 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
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter rootElementName is empty
- Available
- CScript
- 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
- Raises
TypeError – When parameter types are invalid
When parameter input contains invalid values
When parameter rootElementName is empty
- Available
- CScript
- 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
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter rootElementName is empty
- Available
- CScript
- comet.publication.toXMLPublicationTypeList(input, rootElementName='publicationtypes')¶
Generate the XML structure of a list of CPublication.
- Parameters
input (list[CPublicationType]) – The publication types
rootElementName (str) – Name of the root element
- Returns
The XML string representation of this object
- Return type
- Raises
TypeError – When parameter types are invalid
When parameter input contains invalid values
When parameter rootElementName is empty
- Available
- CScript
- 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
- Raises
TypeError – When parameter types are invalid
ValueError – When parameter rootElementName is empty
- Available
- CScript
- comet.publication.toXMLWorkflowStatusList(input, rootElementName='workflowstates')¶
Generate the XML structure of a list of CWorkflowStatus.
- Parameters
input (list[CWorkflowStatus]) – The workflow states
rootElementName (str) – Name of the root element
- Returns
The XML string representation of this object
- Return type
- Raises
TypeError – When parameter types are invalid
When parameter input contains invalid values
When parameter rootElementName is empty
- Available
- CScript