Freeze Node

Description

Freeze a node version, and all the draft node versions on which it depends, i.e. the node version of its node type and all its target nodes.

Freezing is simply the process of incrementing the frozen node version number on the node record so that the node version is no longer considered in draft.

To freeze a node, the node must be in draft, and the user must have admin authority over the node. If the node is not in draft, the service does nothing.

The service takes one of two actions: impact or force.

With an action of impact, the service calculates all the nodes which would need to be frozen if this node is frozen, including this node. If there are no such nodes (because the current node is already frozen), it returns an error number of 0 to indicate that there is no impact. If the user has admin authority over all of these other nodes, the service returns an impact warning (108) and lists the nodes that would also be frozen. If the user does not have admin authority over all of the nodes, the service returns an impact error (109) and lists the nodes that the user is not authorised to administer.

With an action of force, the service calculates all the nodes which would need to be frozen if this node is frozen, including this node. If there are none (because the current node is already frozen), or the user has admin authority over all of them, the service proceeds with the freeze and returns error number 0 (error number 0 is returned even if it has frozen impacted nodes). If the user does not have admin authority over all of them, it returns an impact error and lists the nodes that the user is not authorised to administer, as for an action of impact.

Client programs should then call the service with an action of impact, and if there are impact warnings, confirm with the user before proceeding with a force action. The service returns node identity fields to make it easy to format confirmation messages for the user.

Setting freezeContentIndicator to true will also freeze all the draft nodes within the package.

If the node is not in a draft state, the service does nothing.

Input

<FreezeNode>
<userLogonReference>userid</userLogonReference>
<password>password</password> <nodeIdentifier/> <nodeReference/> <action>impact|force</action> <freezeContentIndicator>false|true</freezeContentIndicator>
</FreezeNode>

The node to freeze can be identified by the node version identifier or reference. If both are given, the identifier takes precedence.

Output

If there is nothing to do, the service returns:

<FreezeNode>
<errorNumber>0</errorNumber>
<nodeVersionIdentifier/> <nodeVersionReference/> <nodeName/> <nodeIdentifier/> <nodeReference/> <nodeVersionNumber/> </FreezeNode>

The node identity fields are returned as a convenience, to allow client programs to easily display appropriate messages to the user. The node version returned is the latest version.

If there is anything to do, or if there are impact errors, the service returns:

<FreezeNode>
  <errorNumber>108|109</errorNumber>
  <errorDescription/>
  <errorMessage/>
  <nodeVersionIdentifier/>
  <nodeVersionReference/>
  <nodeName/>
  <nodeIdentifier/>
  <nodeReference/>
  <nodeVersionNumber/>
  <ImpactList>
    <Impact>
      <impactType>freeze|error</impactType>
      <nodeVersionIdentifier/>
      <nodeVersionReference/>
      <nodeVersionName/>
    </Impact>
  </ImpactList>
</FreezeNode>

If error 108 is returned, the impact list will contain only freeze impacts. If error 109 is returned, the impact list will contain only freeze errors.

The node passed to the service is included in the impact list if it is not already frozen.

Errors

101 - not authorised

102 - not found

103 - parameter error

108 - impact warning

109 - impact error

Class

com.metrici.xerula.FreezeNodeService