Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * OfficeFloor - http://www.officefloor.net
   * Copyright (C) 2005-2011 Daniel Sagenschneider
   *
   * This program is free 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, either version 3 of the License, or
   * (at your option) any later version.
   *
  * This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
  */
 
 package net.officefloor.compile.spi.officefloor.source;
 
 
Context for the OfficeFloorSource.

Author(s):
Daniel Sagenschneider
 
 public interface OfficeFloorSourceContext {

Obtains the location of the net.officefloor.frame.api.manage.OfficeFloor.

How "location" is interpreted is for the OfficeFloorSource, however passing it to getConfiguration(java.lang.String) should return a net.officefloor.model.repository.ConfigurationItem.

 
 

Obtains the names of the available properties in the order they were defined. This allows for ability to provide variable number of properties identified by a naming convention and being able to maintain their order.

An example would be providing a listing of routing configurations, each entry named route.[something] and order indicating priority.

Returns:
Names of the properties in the order defined.
 
Obtains a required property value.

Parameters:
name Name of the property.
Returns:
Value of the property.
Throws:
OfficeFloorUnknownPropertyError If property was not configured. Let this propagate as the framework will handle it.
 
Obtains the property value or subsequently the default value.

Parameters:
name Name of the property.
defaultValue Default value if property not specified.
Returns:
Value of the property or the the default value if not specified.
 
 	String getProperty(String nameString defaultValue);

Properties to configure the OfficeFloorSource.

Returns:
Properties specific for the OfficeFloorSource.

Loads the net.officefloor.compile.managedobject.ManagedObjectType.

This is to enable obtaining the type information for the net.officefloor.frame.spi.managedobject.ManagedObject to allow reflective configuration by the OfficeFloorSource.

			String managedObjectSourceClassNamePropertyList properties);

Loads the net.officefloor.compile.office.OfficeType.

This is to enable obtaining the type information for the net.officefloor.frame.api.manage.Office to allow reflective configuration by the OfficeFloorSource.

Parameters:
officeSourceClassName Name of the implementing net.officefloor.compile.spi.office.source.OfficeSource class. May also be an alias.
location Location of the net.officefloor.frame.api.manage.Office.
properties net.officefloor.compile.properties.PropertyList to configure the net.officefloor.compile.spi.office.source.OfficeSource.
Returns:
net.officefloor.compile.office.OfficeType or null if fails to load the net.officefloor.compile.office.OfficeType.
	OfficeType loadOfficeType(String officeSourceClassNameString location,
			PropertyList properties);
New to GrepCode? Check out our FAQ X