Class icm.model.CaseEditable


Extends ecm.model._ModelObject.
Represents the scratchpad state for editing a case.
Defined in: <icm/model/CaseEditable.js>.

Constructor Summary

Constructor Attributes Constructor Name and Description
 
Constructs a CaseEditable object.

Field Summary

Field Attributes Field Name and Description
 
The icm.model.Case object associated with this CaseEditable.
 
The icm.model.CaseType object associated with this CaseEditable.
 
Will be non-null if integrating with an external data service
 
True if this CaseEditable represents editing a new Case, false if editing an existing Case.
 
True if this CaseEditable represents editing a new split Case, false otherwise.
 
A collection of icm.model.PropertyEditable objects.
 
If pendingSplit is true, this is the description of the split relationship that associates the original source Case to the split Case.
 
If pendingSplit is true, this is some filing instructions to be applied when the split case is created.
 
When creating a new split Case, this is the source Case that it is being split from.

Method Summary

Method Attributes Method Name and Description
<static>  
icm.model.CaseEditable.createPendingInstance(caseType, callback, errCallback, backgroundRequest)
Creates a CaseEditable object that represents a new Case object.
<static>  
icm.model.CaseEditable.createPendingSplitInstance(splitSource, caseType, callback, errCallback, backgroundRequest)
Creates a CaseEditable object that represents a new Case object that is split from another Case.
<static>  
icm.model.CaseEditable.fromCaseObject(caseObject)
Constructs a CaseEditable object and associates with an existing Case object.
 
Returns whatever attribute value represents the case title.
 
Returns the CaseType for this case.
 
Returns the date that the case was last modified.
 
Returns the case identifier.
 
getProperty(provider, symbolicName)
Obtains the PropertyEditable from the propertiesCollection property with the given provider and symbolic name.
 
Returns true if any PropertyEditable objects in this object's collection has a true value for its dependentsRetrievalPending property.
 
Called when the entire state of the object is refreshed, primarily when the attributes have been updated based on updated information from the server.
 
refreshFromJSON(result, callback, errCallback, backgroundRequest)
Refreshes this object from the result obtained after submitting some changes to the server.
 
retrieveAttributes(callback, errCallback, backgroundRequest)
Retrieves all attributes of the Case object and updates this CaseEditable object with the new set of attributes.
 
retrieveCachedAttributes(callback, errCallback, backgroundRequest)
Ensures that the full set of attributes has been retrieved.
 
retrieveDependentProperties(callback, errCallback, backgroundRequest)
Retrieves the dependent properties when one or more properties have a dependentsRetrievalPending value of true.
 
save(callback, errCallback, backgroundRequest)
Saves this CaseEditable object.
 
setFoldersAndDocToBeFiled(foldersAndDocToBeFiled)
Sets the list of instructions for the documents to be filed in the folders of the split case.
 
setSplitDescription(description)
Sets the description for the split operation.
 

Constructor Detail

icm.model.CaseEditable(properties)

Constructs a CaseEditable object. A CaseEditable object is typically constructed internally by other model objects.
Parameters:
properties
The properties for the CaseEditable object. The properties can be any of the public fields as defined below and on ecm.model._ModelObject.

Field Detail

caseObject

The icm.model.Case object associated with this CaseEditable. If this CaseEditable represents a new Case, the Case object does not exist until this CaseEditable is saved.

caseType

The icm.model.CaseType object associated with this CaseEditable. If this CaseEditable represents a new Case, this is the case type of the case to be created.

externalDataIdentifier

Will be non-null if integrating with an external data service

pendingCreate

True if this CaseEditable represents editing a new Case, false if editing an existing Case.

pendingSplit

True if this CaseEditable represents editing a new split Case, false otherwise. If this property is true, pendingCreate is also true.

propertiesCollection

A collection of icm.model.PropertyEditable objects.

splitDescription

If pendingSplit is true, this is the description of the split relationship that associates the original source Case to the split Case.

splitDocFiling

If pendingSplit is true, this is some filing instructions to be applied when the split case is created.

splitSource

When creating a new split Case, this is the source Case that it is being split from.

Method Detail

<static> icm.model.CaseEditable.createPendingInstance(caseType, callback, errCallback, backgroundRequest)

Creates a CaseEditable object that represents a new Case object. The new Case object is not persisted until save() is called on the CaseEditable object.
Parameters:
caseType
An icm.model.CaseType for the case type of the new Case to create.
callback
Callback function called with the new CaseEditable object when the request completes.
errCallback
An optional argument. A function called if the request fails.
backgroundRequest
An optional argument. If true, indicates the request is processed in the background.

<static> icm.model.CaseEditable.createPendingSplitInstance(splitSource, caseType, callback, errCallback, backgroundRequest)

Creates a CaseEditable object that represents a new Case object that is split from another Case.
Parameters:
splitSource
An icm.model.Case object for the source case that is being split.
caseType
An icm.model.CaseType for the case type of the new Case to create.
callback
Callback function called with the new CaseEditable object when the request completes.
errCallback
An optional argument. A function called if the request fails.
backgroundRequest
An optional argument. If true, indicates the request is processed in the background.

<static> icm.model.CaseEditable.fromCaseObject(caseObject)

Constructs a CaseEditable object and associates with an existing Case object.
Parameters:
caseObject
An icm.model.Case object from which to construct this CaseEditable object.
Returns:
An icm.model.CaseEditable object.

getCaseTitle()

Returns whatever attribute value represents the case title. The specific case title property can be controlled on an individual case type. This is a convenience method equivalent to accessing the caseObject member directly.
Returns:
The case title property value

getCaseType()

Returns the CaseType for this case. This is a convenience method that either returns the caseType member if this CaseEditable represents a new Case or the CaseType associated with the caseObject member if this represents an existing Case.
Returns:
icm.model.CaseType

getDateLastModified()

Returns the date that the case was last modified. This is a convenience method equivalent to accessing the caseObject member directly.
Returns:
(Date) the case last modified date

getIdentifier()

Returns the case identifier. This is a convenience method equivalent to accessing the caseObject member directly.
Returns:
String of the identifier

getProperty(provider, symbolicName)

Obtains the PropertyEditable from the propertiesCollection property with the given provider and symbolic name. The PropertyEditable objects in propertiesCollection are keyed by the id of each PropertyEditable. In some cases that id could be different from the symbolic name. This method is a shortcut to find the appropriate property object.

Parameters:
provider
symbolicName
Returns:
PropertyEditable object if one exists with the given provider and symbolic name. Otherwise null.

isDependentPropertiesRetrievalPending()

Returns true if any PropertyEditable objects in this object's collection has a true value for its dependentsRetrievalPending property.
Returns:
(boolean) true if any dependents retrieval is pending

onRefresh()

Called when the entire state of the object is refreshed, primarily when the attributes have been updated based on updated information from the server.

refreshFromJSON(result, callback, errCallback, backgroundRequest)

Refreshes this object from the result obtained after submitting some changes to the server. Those changes were represented by the payload obtained by calling toJSON(). After executing these changes on the server, the result payload received from the server is then passed to this method to refresh this object.
Parameters:
result
callback
errCallback
backgroundRequest

retrieveAttributes(callback, errCallback, backgroundRequest)

Retrieves all attributes of the Case object and updates this CaseEditable object with the new set of attributes.

This is a convenience method equivalent to calling retrieveAttributes() on the Case object corresponding to this CaseEditable. This CaseEditable is refreshed after the attributes have been retrieved by the Case object.

If this CaseEditable represents a new Case that has not yet been saved, no action is taken and the callback is called immediately.

Parameters:
callback
Callback function called with this CaseEditable as an argument when the request completes.
errCallback
An optional argument. A function called if the request fails.
backgroundRequest
An optional argument. If true, indicates the request is processed in the background.

retrieveCachedAttributes(callback, errCallback, backgroundRequest)

Ensures that the full set of attributes has been retrieved. This is a convenience method equivalent to calling retrieveCachedAttributes() on the Case object corresponding to this CaseEditable. This CaseEditable is refreshed after the attributes have been retrieved by the Case object, if the full set needs to be retrieved.

If this CaseEditable represents a new Case that has not yet been saved, no action is taken and the callback is called immediately.

Parameters:
callback
Callback function called with this CaseEditable as an argument after the request completes.
errCallback
An optional argument. A function called if the request fails.
backgroundRequest
An optional argument. If true, indicates the request is processed in the background.

retrieveDependentProperties(callback, errCallback, backgroundRequest)

Retrieves the dependent properties when one or more properties have a dependentsRetrievalPending value of true.
Parameters:
callback
Callback function called with this CaseEditable as an argument when the request completes.
errCallback
An optional argument. A function called if the request fails.
backgroundRequest
An optional argument. If true, indicates the request is processed in the background.

save(callback, errCallback, backgroundRequest)

Saves this CaseEditable object. Either a new case is created or the existing case is modified.
Parameters:
callback
Callback function called with this CaseEditable as an argument when the request completes.
errCallback
Callback function called when the request fails
backgroundRequest
An optional argument. If true, indicates the request is processed in the background

setFoldersAndDocToBeFiled(foldersAndDocToBeFiled)

Sets the list of instructions for the documents to be filed in the folders of the split case.
Parameters:
foldersAndDocToBeFiled
an array of objects representing the list of instructions for the documents to be filed in the folders of the split case. Each object in the array is of the form:

{folderName: <name>, documentId: <vsId>}

For example:

{folderName: "/SubFolder", documentId: 8761427B-DF34-4461-9099-2FE0FA25D9D0}

For each instruction in the list, the document with the specified version series ID is filed in the specified sub-folder. The folder is identified by the relative path, with the case folder itself represented as "/". The instructions represent folders and documents in the source case to be filed in the new split case.


setSplitDescription(description)

Sets the description for the split operation.
Parameters:
description
a textual description of the split operation. This description is captured in the relationship objects relating the source case to the split case, and can be viewed by a user later.

toJSON()