Packagesoi.screens.sections.models
Classpublic class ProjectDetailsModel

The ProjectDetailsModel class is the data model of the current active project and its properties. The properties of this class are used as the initial starting points for the loading, saving and unloading of projects within the application.



Public Properties
 PropertyDefined by
  contents : String
This property is the name of the loaded contents XML file, or a reference to the STATUS_NONE constant if set to null - indicating the contents XML is not loaded, or the contents XML file does not exist.
ProjectDetailsModel
  contentsChanged : Boolean = false
This property is referenced by the save contents button control through binding to enable itself and alert the user when the contents XML has changed, and disable itself and alert the user that their changes have been saved.
ProjectDetailsModel
  contentsOpen : Boolean = false
This property is referenced by the main accordion control to enable and disable the contents palette, and by the file IO methods related to the contents XML in the Application class.
ProjectDetailsModel
  contentsStatus : String
This property represents the status of the contents XML and has the value of the STATUS_NONE constant, or the STATUS_READY constant.
ProjectDetailsModel
  currentPage : Number = 0
This property is a reference to the currentPage property of the Application class and represents the number of the current open page in the eMag Viewer tab.
ProjectDetailsModel
  date : String
[read-only] This property returns the dateObject property as a legibly formatted date string
ProjectDetailsModel
  dateObject : Date
This property is a date object representing the creation date of the active project, or null if there is no active project.
ProjectDetailsModel
  deployDate : Date
This property is a date object representing the date the active project's deploy folder was most recently updated, or null if there is no active project, or the active project has not been deployed.
ProjectDetailsModel
  document : String
This property is the name of the loaded document SWF file, or a reference to the STATUS_NONE constant if set to null - indicating the document SWF is not loaded, or the document SWF file does not exist.
ProjectDetailsModel
  documentOpen : Boolean = false
This property is referenced by the main eMag Viewer tab control to enable and disable the splash screen, and by the Application class during loading and unloading of an active project.
ProjectDetailsModel
  documentStatus : String
This property represents the status of the document SWF and has the value of the STATUS_NONE constant, or the STATUS_READY constant.
ProjectDetailsModel
  links : String
This property is the name of the loaded links XML file, or a reference to the STATUS_NONE constant if set to null - indicating the links XML is not loaded, or the links XML file does not exist.
ProjectDetailsModel
  linksChanged : Boolean = false
This property is referenced by the save links button control through binding to enable itself and alert the user when the links XML has changed, and disable itself and alert the user that their changes have been saved.
ProjectDetailsModel
  linksOpen : Boolean = false
This property is referenced by the main accordion control to enable and disable the links palette, and by the file IO methods related to the links XML in the Application class.
ProjectDetailsModel
  linksStatus : String
This property represents the status of the links XML and has the value of the STATUS_NONE constant, or the STATUS_READY constant.
ProjectDetailsModel
  name : String
This property represents the folder name of currently active project.
ProjectDetailsModel
  pagesArray : Array
This property is an array of objects the length of the totalPages property to be used as the source of the pagesCol ArrayCollection property.
ProjectDetailsModel
  pagesCol : ArrayCollection
This property is the collection wrapper of the pagesArray property to be used as a dataProvider for project navigation controls and lists.
ProjectDetailsModel
  status : String
This property is a string representation of the project's status.
ProjectDetailsModel
  totalPages : Number
This property is a reference to the totalPages property of the Application class and represents the total number of the pages of the active document in the eMag Viewer tab.
ProjectDetailsModel
Public Methods
 MethodDefined by
  
Constructor.
ProjectDetailsModel
  
This method sets the contentsChanged property to true, which alerts the save contents button control through binding that changes have been made to the contents XML.
ProjectDetailsModel
  
This method sets the linksChanged property to true, which alerts the save links button control through binding that changes have been made to the links XML.
ProjectDetailsModel
Public Constants
 ConstantDefined by
  STATUS_NONE : String = "none"
[static] The STATUS_NONE constant is used as an internal and external compile-time reference for the values of relevant string properties in this class.
ProjectDetailsModel
  STATUS_READY : String = "ready"
[static] The STATUS_READY constant is used as an internal and external compile-time reference for the values of relevant string properties in this class.
ProjectDetailsModel
Property detail
contentsproperty
contents:String  [read-write]

This property is the name of the loaded contents XML file, or a reference to the STATUS_NONE constant if set to null - indicating the contents XML is not loaded, or the contents XML file does not exist. Setting this property automatically sets the contentsStatus property value to the STATUS_READY constant, or to the STATUS_NONE constant if null. The status property is then automatically set to "update" and the status queue is then processed in the property's setter. This property is referenced through binding by interface controls such as buttons and textInputs which adjust their functionality and appearance to reflect ready, enabled, load, unload, import, and deploy states.

This property can be used as the source for data binding.

Implementation
    public function get contents():String
    public function set contents(value:String):void
contentsChangedproperty 
public var contentsChanged:Boolean = false

This property is referenced by the save contents button control through binding to enable itself and alert the user when the contents XML has changed, and disable itself and alert the user that their changes have been saved.

contentsOpenproperty 
public var contentsOpen:Boolean = false

This property is referenced by the main accordion control to enable and disable the contents palette, and by the file IO methods related to the contents XML in the Application class.

contentsStatusproperty 
public var contentsStatus:String

This property represents the status of the contents XML and has the value of the STATUS_NONE constant, or the STATUS_READY constant. This property is referenced by the RichLabel itemRenderer class to display an overview and style property to reflect the completion status of its project in the dataGrid control of the ProjectNavigator component.

currentPageproperty 
public var currentPage:Number = 0

This property is a reference to the currentPage property of the Application class and represents the number of the current open page in the eMag Viewer tab. This property is typically set by the Application class, and updates its references through binding.

The default value is 0.

dateproperty 
date:String  [read-only]

This property returns the dateObject property as a legibly formatted date string

This property can be used as the source for data binding.

Implementation
    public function get date():String
dateObjectproperty 
public var dateObject:Date

This property is a date object representing the creation date of the active project, or null if there is no active project.

deployDateproperty 
deployDate:Date  [read-write]

This property is a date object representing the date the active project's deploy folder was most recently updated, or null if there is no active project, or the active project has not been deployed. This property automatically calls the status property's setter and increments its processing queue. This property enables comparisons of the projects creation and its last successful deployment and is referenced by relevant label controls accordingly.

This property can be used as the source for data binding.

Implementation
    public function get deployDate():Date
    public function set deployDate(value:Date):void
documentproperty 
document:String  [read-write]

This property is the name of the loaded document SWF file, or a reference to the STATUS_NONE constant if set to null - indicating the document SWF is not loaded, or the document SWF file does not exist. Setting this property automatically sets the documentStatus property value to the STATUS_READY constant, or to the STATUS_NONE constant if null. The status property is then automatically set to "update" and the status queue is then processed in the property's setter. This property is referenced through binding by interface controls such as buttons and textInputs which adjust their functionality and appearance to reflect ready, enabled, load, unload, import, and deploy states.

This property can be used as the source for data binding.

Implementation
    public function get document():String
    public function set document(value:String):void
documentOpenproperty 
public var documentOpen:Boolean = false

This property is referenced by the main eMag Viewer tab control to enable and disable the splash screen, and by the Application class during loading and unloading of an active project.

documentStatusproperty 
public var documentStatus:String

This property represents the status of the document SWF and has the value of the STATUS_NONE constant, or the STATUS_READY constant. This property is referenced by the RichLabel itemRenderer class to display an overview and style property to reflect the completion status of its project in the dataGrid control of the ProjectNavigator component.

linksproperty 
links:String  [read-write]

This property is the name of the loaded links XML file, or a reference to the STATUS_NONE constant if set to null - indicating the links XML is not loaded, or the links XML file does not exist. Setting this property automatically sets the linksStatus property value to the STATUS_READY constant, or to the STATUS_NONE constant if null. The status property is then automatically set to "update" and the status queue is then processed in the property's setter. This property is referenced through binding by interface controls such as buttons and textInputs which adjust their functionality and appearance to reflect ready, enabled, load, unload, import, and deploy states.

This property can be used as the source for data binding.

Implementation
    public function get links():String
    public function set links(value:String):void
linksChangedproperty 
public var linksChanged:Boolean = false

This property is referenced by the save links button control through binding to enable itself and alert the user when the links XML has changed, and disable itself and alert the user that their changes have been saved.

linksOpenproperty 
public var linksOpen:Boolean = false

This property is referenced by the main accordion control to enable and disable the links palette, and by the file IO methods related to the links XML in the Application class.

linksStatusproperty 
public var linksStatus:String

This property represents the status of the links XML and has the value of the STATUS_NONE constant, or the STATUS_READY constant. This property is referenced by the RichLabel itemRenderer class to display an overview and style property to reflect the completion status of its project in the dataGrid control of the ProjectNavigator component.

nameproperty 
public var name:String

This property represents the folder name of currently active project. It is used as a reference when opening and saving all files of the currently active project. It is also used as the name of the project for list based user interface controls.

pagesArrayproperty 
public var pagesArray:Array

This property is an array of objects the length of the totalPages property to be used as the source of the pagesCol ArrayCollection property.

pagesColproperty 
public var pagesCol:ArrayCollection

This property is the collection wrapper of the pagesArray property to be used as a dataProvider for project navigation controls and lists.

statusproperty 
status:String  [read-write]

This property is a string representation of the project's status. The status setter contains a counter queue which increments based on the valid values of the deployDate, document, links, and contents properties. The status property is then set to the value of the index in the statusLevel which matches the counter queue.

This property can be used as the source for data binding.

Implementation
    public function get status():String
    public function set status(value:String):void
totalPagesproperty 
totalPages:Number  [read-write]

This property is a reference to the totalPages property of the Application class and represents the total number of the pages of the active document in the eMag Viewer tab. If there is no active document, this property is set to 0. This property is typically set by the Application class, and updates its references through binding. User interface components such as the PageBrowser composite control monitor this property as part of their encapsulated business logic. Setting this property to a value greater than 0 will automatically instantiate the pagesArray property, which creates an array of page objects the length of the total pages. The pagesCol ArrayCollection then assigns the pagesArray property as its source, which updates any user interface controls subscribing to this property through binding.

The default value is 0.

This property can be used as the source for data binding.

Implementation
    public function get totalPages():Number
    public function set totalPages(value:Number):void
Constructor detail
ProjectDetailsModel()constructor
public function ProjectDetailsModel()

Constructor. The constructor automatically instantiates the following properties: dateFormatter DateFormatter and its formatString deployDateFormatter Dateformatter and its formatString pagesArray Array pagesCol ArrayCollection

Method detail
setContentsChanged()method
public function setContentsChanged():void

This method sets the contentsChanged property to true, which alerts the save contents button control through binding that changes have been made to the contents XML. The save contents button then activates to alert the user that changes have been made. This method is typically called by the class which has affected the change to the contents XML.

setLinksChanged()method 
public function setLinksChanged():void

This method sets the linksChanged property to true, which alerts the save links button control through binding that changes have been made to the links XML. The save links button then activates to alert the user that changes have been made. This method is typically called by the class which has affected the change to the links XML.

Constant detail
STATUS_NONEconstant
public static const STATUS_NONE:String = "none"

The STATUS_NONE constant is used as an internal and external compile-time reference for the values of relevant string properties in this class.

STATUS_READYconstant 
public static const STATUS_READY:String = "ready"

The STATUS_READY constant is used as an internal and external compile-time reference for the values of relevant string properties in this class.