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.model.repository;
 
Repository to the net.officefloor.model.Model instances.

Author(s):
Daniel Sagenschneider
 
 public interface ModelRepository {

Creates the ConfigurationItem to hold the net.officefloor.model.Model.

Parameters:
location Relative location within the ConfigurationContext to create the ConfigurationItem.
model net.officefloor.model.Model to be stored in the created ConfigurationItem.
context ConfigurationContext.
Returns:
ConfigurationItem created for the net.officefloor.model.Model.
Throws:
java.lang.Exception If fails to create the ConfigurationItem.
 
 	ConfigurationItem create(String locationObject model,
 			ConfigurationContext contextthrows Exception;

Stores the net.officefloor.model.Model within the ConfigurationItem.

Parameters:
model net.officefloor.model.Model to be stored.
configuration ConfigurationItem to contain the net.officefloor.model.Model.
Throws:
java.lang.Exception If fails to store the net.officefloor.model.Model.
 
 	void store(Object modelConfigurationItem configurationthrows Exception;

Configures the net.officefloor.model.Model from the ConfigurationItem.

Parameters:
model net.officefloor.model.Model to be configured.
configuration ConfigurationItem containing configuration of the net.officefloor.model.Model.
Returns:
Configured net.officefloor.model.Model.
Throws:
java.lang.Exception If fails to configure the net.officefloor.model.Model.
 
 	<O> O retrieve(O modelConfigurationItem configurationthrows Exception;

Registers meta-data for a net.officefloor.model.Model to be retrieved.

 
 	void registerModel(Class<?> modelTypethrows Exception;

Retrieves the net.officefloor.model.Model from the ConfigurationItem.

Only net.officefloor.model.Model instances successfully registered by registerModel(java.lang.Class) may be retrieved by this method.

Parameters:
configuration ConfigurationItem containing configuration of the net.officefloor.model.Model.
Returns:
net.officefloor.model.Model for the ConfigurationItem.
Throws:
java.lang.Exception If fails to retrieve the net.officefloor.model.Model.
 
 	Object retrieve(ConfigurationItem configurationthrows Exception;
New to GrepCode? Check out our FAQ X