Fire up your applications with Jetfire
RSS
Jetfire Wiki

About Us

Code Plex Projects

COR COR Administration Debug GUI Jetfire Administration Jetfire Code Jetfire Core Jetfire Language Jetfire Web Part Library misc Release Notes Roles Solutions States Training User Administration Versioning Web Parts Web Service Website Design Website Procedures Wiki conventions WordML Workflow Administration

Quick Search
»
Advanced Search »

PoweredBy

Table of Contents [Hide/Show]


Jetfire Code: Location

// L O C A T I O N    W O R K F L O W
//===================================================================================
// Location.txt
//===================================================================================
// Copyright (C) 2007 TrackerRealm Corporation
// This file is part of Jetfire.  http://Jetfire.ca
// 
// Jetfire is open software: you can redistribute it and/or modify it under the terms
// of the GNU General Public License as published by the Free Software Foundation,
// version 3 of the License.
// 
// Jetfire is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
// without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
// See the GNU General Public License for more details.
// 
// You should have received a copy of the GNU General Public License along with Jetfire.  
// If not, see http://www.gnu.org/licenses.
// REMOVAL OF THIS NOTICE IS VIOLATION OF THE COPYRIGHT.
//===================================================================================
//
// DisplayName = "Location";
// ToolTip = "This workflow is the location where work is done.";

namespace JetfireContacts
{
	public workflow Location
	{
		// C O N S T R U C T O R - Instantiate the Location
		public Location()
		{
			Subject = " New Location";
			enterstate Start();
		}
		public Location(string subject)
		{
			Subject = subject;
			enterstate Start();
		}
		public Location(string subject, string toolTip)
		{
			Subject = subject;
			ToolTip = toolTip;
			enterstate Start();
		}
		public Location(string name, string subject, string toolTip)
		{
			name = name;
			Subject = subject;
			ToolTip = toolTip;
			enterstate Start();
		}
		// P R O P E R T I E S
		public string Name
		{
			get;
			set;
		}
		public OrganizationUnit OrgUnit
		{
			get;
			set;
		}
		public TimeZone TimeZone
		{
			get;
			set;
		}
		public List Addresses
		{
			get;
			private set;
		}
		public List EmailAddresses
		{
			get;
			private set;
		}
		public List PhoneNumbers
		{
			get;
			private set;
		}

		// Static Properties      
		private static Location none;
		public static Location None
		{
			get { return none;		}
			set { none = value;	}
		}

		// S T A T E S
		// State Transition        Command       Comment
		// Instantiate -> Start    New           The configuration object enters the New state when instantiated
		// Start -> Active         Approve       The user approves the data
		// Active -> Inactive      Deactivate    The user marks the data as inactive.
		// Inactive -> Active      Activate      The user marks the data as active.
		//
		// S T A T E   M E T H O D S
		public Start()
		{
		}
		public Active()
		{
		}
		public Inactive()
		{
		}
		// C O M M A N D S
		// The Save command can be used in the Start and Editing states
		// The Approve command can be used in the Pending state by the Administrator
		public void Approve() : states(Start)
		{
			enterstate Active();
		}
		// The Inactive command is used to edit the data
		public void Deactivate() : states(Active)
		{
			enterstate Inactive();
		}
		// The Active command is used to edit the data
		public void Activate() : states(Inactive)
		{
			enterstate Active();
		}
	}
}

See Also

Jetfire Code Library
Jetfire Contacts Code Library

ScrewTurn Wiki version 3.0.4.560. Some of the icons created by FamFamFam.