net.officefloor.eclipse.util
Class ModelUtil

java.lang.Object
  extended by net.officefloor.eclipse.util.ModelUtil

public class ModelUtil
extends Object

Utility class for working with the Model instances.

Author:
Daniel Sagenschneider

Method Summary
static ManagedObjectType<?> getManagedObjectType(DeskManagedObjectSourceModel managedObjectSource, AbstractOfficeFloorEditor<?,?> editor)
          Obtains the ManagedObjectType for the DeskManagedObjectSourceModel.
static ManagedObjectType<?> getManagedObjectType(OfficeFloorManagedObjectSourceModel managedObjectSource, AbstractOfficeFloorEditor<?,?> editor)
          Obtains the ManagedObjectType for the OfficeFloorManagedObjectSourceModel.
static ManagedObjectType<?> getManagedObjectType(OfficeManagedObjectSourceModel managedObjectSource, AbstractOfficeFloorEditor<?,?> editor)
          Obtains the ManagedObjectType for the OfficeManagedObjectSourceModel.
static ManagedObjectType<?> getManagedObjectType(SectionManagedObjectSourceModel managedObjectSource, AbstractOfficeFloorEditor<?,?> editor)
          Obtains the ManagedObjectType for the SectionManagedObjectSourceModel.
static ManagedObjectType<?> getManagedObjectType(String managedObjectSourceClassName, PropertyList properties, OfficeFloorCompiler compiler, AbstractOfficeFloorEditor<?,?> editor)
          Obtains the ManagedObjectType for the OfficeManagedObjectSourceModel.
static OfficeSection getOfficeSection(OfficeSectionModel officeSection, OfficeFloorCompiler compiler, CompilerIssues issues, AbstractOfficeFloorEditor<?,?> editor)
          Obtains the OfficeSection for the OfficeSectionModel.
static WorkType<?> getWorkType(WorkModel workModel, AbstractOfficeFloorEditor<?,?> editor)
          Obtains the WorkType for the WorkModel.
static
<S> Class<S>
obtainClass(String className, Class<S> superType, ClassLoader classLoader, AbstractOfficeFloorEditor<?,?> editor)
          Obtains the Class by its name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getWorkType

public static WorkType<?> getWorkType(WorkModel workModel,
                                      AbstractOfficeFloorEditor<?,?> editor)
Obtains the WorkType for the WorkModel.

Parameters:
workModel - WorkModel.
editor - AbstractOfficeFloorEditor requiring the WorkType.
Returns:
WorkType or null if issue obtaining it.

getManagedObjectType

public static ManagedObjectType<?> getManagedObjectType(OfficeFloorManagedObjectSourceModel managedObjectSource,
                                                        AbstractOfficeFloorEditor<?,?> editor)
Obtains the ManagedObjectType for the OfficeFloorManagedObjectSourceModel.

Parameters:
managedObjectSource - OfficeFloorManagedObjectSourceModel.
editor - AbstractOfficeFloorEditor requiring the ManagedObjectType.
Returns:
ManagedObjectType or null if issue obtaining it.

getManagedObjectType

public static ManagedObjectType<?> getManagedObjectType(OfficeManagedObjectSourceModel managedObjectSource,
                                                        AbstractOfficeFloorEditor<?,?> editor)
Obtains the ManagedObjectType for the OfficeManagedObjectSourceModel.

Parameters:
managedObjectSource - OfficeManagedObjectSourceModel.
editor - AbstractOfficeFloorEditor requiring the ManagedObjectType.
Returns:
ManagedObjectType or null if issue obtaining it.

getManagedObjectType

public static ManagedObjectType<?> getManagedObjectType(SectionManagedObjectSourceModel managedObjectSource,
                                                        AbstractOfficeFloorEditor<?,?> editor)
Obtains the ManagedObjectType for the SectionManagedObjectSourceModel.

Parameters:
managedObjectSource - SectionManagedObjectSourceModel.
editor - AbstractOfficeFloorEditor requiring the ManagedObjectType.
Returns:
ManagedObjectType or null if issue obtaining it.

getManagedObjectType

public static ManagedObjectType<?> getManagedObjectType(DeskManagedObjectSourceModel managedObjectSource,
                                                        AbstractOfficeFloorEditor<?,?> editor)
Obtains the ManagedObjectType for the DeskManagedObjectSourceModel.

Parameters:
managedObjectSource - DeskManagedObjectSourceModel.
editor - AbstractOfficeFloorEditor requiring the ManagedObjectType.
Returns:
ManagedObjectType or null if issue obtaining it.

getManagedObjectType

public static ManagedObjectType<?> getManagedObjectType(String managedObjectSourceClassName,
                                                        PropertyList properties,
                                                        OfficeFloorCompiler compiler,
                                                        AbstractOfficeFloorEditor<?,?> editor)
Obtains the ManagedObjectType for the OfficeManagedObjectSourceModel.

Parameters:
managedObjectSourceClassName - Class name of the ManagedObjectSource.
properties - PropertyList.
compiler - OfficeFloorCompiler.
editor - AbstractOfficeFloorEditor requiring the ManagedObjectType.
Returns:
ManagedObjectType or null if issue obtaining it.

getOfficeSection

public static OfficeSection getOfficeSection(OfficeSectionModel officeSection,
                                             OfficeFloorCompiler compiler,
                                             CompilerIssues issues,
                                             AbstractOfficeFloorEditor<?,?> editor)
Obtains the OfficeSection for the OfficeSectionModel.

Parameters:
officeSection - OfficeSectionModel.
compiler - OfficeFloorCompiler.
issues - CompilerIssues.
editor - AbstractOfficeFloorEditor.
Returns:
OfficeSection or null if failed to load.

obtainClass

public static <S> Class<S> obtainClass(String className,
                                       Class<S> superType,
                                       ClassLoader classLoader,
                                       AbstractOfficeFloorEditor<?,?> editor)
Obtains the Class by its name.

Parameters:
className - Fully qualified name of the class.
superType - Type that the class must be a sub type.
classLoader - ClassLoader.
editor - AbstractOfficeFloorEditor to report issues and obtain the IProject.
Returns:
Class or null if could not obtain.


Copyright © 2005-2013. All Rights Reserved.