Methods
-
Appearition.Mop.Document.CreateMopDocument (request, requestOptions)Appearition.Mop.Document.MopDocItemViewModel static
Will create a new record in the database to hold the Mop document information. Once this returns successfully, you can invoke the UploadMopDocument method to push the new file up to the server. You will need to pick up the new MopDocumentId from the return object and pass it to the UploadMopDocument. Will return an Appearition.Mop.Document.MopDocItemViewModel object
-
Name Type Description requestAppearition.Mop.Document.MopDocItemViewModel Contains the details of the Mop document
requestOptionsAppearition.RequestOptions Contains the various callback methods for this request
Returns:
Type Description Appearition.Mop.Document.MopDocItemViewModel This is returned as part of the success callback function in the requestOptions param -
Will delete an existing Mop document. Nothing will be returned unless an error occurs.
-
Name Type Description requestAppearition.Mop.Document.MopDocItemViewModel Contains the details of the Mop
requestOptionsAppearition.RequestOptions Contains the various callback methods for this request
-
Appearition.Mop.Document.MopDocuments (requestOptions)Appearition.Mop.Document.MopDocViewModel static
This method will return all MOP documents. It will return a collection of Appearition.Mop.Document.MopDocViewModel
-
Name Type Description requestOptionsAppearition.RequestOptions configure callbacks
Returns:
Type Description Appearition.Mop.Document.MopDocViewModel This is returned as part of the success callback function in the requestOptions param -
Appearition.Mop.Document.UpdateMopDocument (request, requestOptions)Appearition.Mop.Document.MopDocItemViewModel static
Will setup a new version of the Mop document. Once this returns successfully, you can invoke the UploadMopDocument method to push the new file up to the server. You will need to pick up the new MopDocumentId from the return object and pass it to the UploadMopDocument. Will return an Appearition.Mop.Document.MopDocItemViewModel object
-
Name Type Description requestAppearition.Mop.Document.MopDocItemViewModel Contains the details of the Mop
requestOptionsAppearition.RequestOptions Contains the various callback methods for this request
Returns:
Type Description Appearition.Mop.Document.MopDocItemViewModel This is returned as part of the success callback function in the requestOptions param -
Appearition.Mop.Document.UploadMopDocument (mopDocumentId, fileName, fileContent, requestOptions) static
Once the CreateMopDocument or UpdateMopDocument methods succeed, invoke this method to upload the file to the server. This will not return anything unless a failure occurs.
-
Name Type Description mopDocumentIdnumber The unique identifier of the Mop Document which returned by the CreateMopDocument or UpdateMopDocument methods
fileNamenumber The name of the file being uploaded
fileContentstring The file contents that need to be submitted to the server
requestOptionsAppearition.RequestOptions Contains the various callback methods for this request
Type Definitions
-
This data structure holds the details of a specific Mop document
-
Properties:
Name Type Description MopDocumentIdnumber The unique identifier of the Mop Document. This is a system generated value
ShelterTypeAppearition.Site.ShelterTypeEnum The numerical value of the Appearition.Site.ShelterTypeEnum. This is a mandatory property
ShelterTypeNamestring The name of the ShelterType
MainsHybridGensetAppearition.Site.MainsHybridGensetEnum The numerical value of the Appearition.Site.MainsHybridGensetEnum.
MainsHybridGensetNamestring The name of the MainsHybridGenset
DocumentTitlestring The title of the document. This will differ to FileName
Descriptionstring The description of the document
FileNamestring The description of the document
DocumentVersionnumber The version of the document. You upload a new file to an existing MopDocument and the version number will increment
ModifiedUtcDateDisplaystring The date/time the document was changed. (Format "d/MM/yy HH:mm"). Note, whilst the field name suggest UTC, the server will attempt to convert it to your local timezone if its known. If not the UTC date is simply returned
-
This data structure holds a collection of all MOP documents and a list of ShelterTypes and a list of MainsHybridGenset.
-
Properties:
Name Type Description DocsArray.<Appearition.Mop.Document.MopDocItemViewModel> The collection of documents linked to the Mop
DocAppearition.Mop.Document.MopDocItemViewModel Is an empty data structure that can be used to setup a new doc for saving to the server
ShelterTypeListArray.<Appearition.SelectListItem> ShelterType is a property of a site. A MOP document can be linked to a Shelter Type
MainsHybridGensetListArray.<Appearition.SelectListItem> MainsHybridGenset is a property of a site. A MOP document can be linked to a MainsHybridGenset