net.officefloor.eclipse.repository.project
Class ProjectConfigurationContext

java.lang.Object
  extended by net.officefloor.eclipse.repository.project.ProjectConfigurationContext
All Implemented Interfaces:
ConfigurationContext

public class ProjectConfigurationContext
extends Object
implements ConfigurationContext

Implementation of ConfigurationContext for a IProject providing context for a IFile.

Author:
Daniel Sagenschneider

Constructor Summary
ProjectConfigurationContext(org.eclipse.ui.IEditorInput editorInput)
          Convenience constructor.
ProjectConfigurationContext(org.eclipse.core.resources.IProject project)
          Initiate with the IProject providing context.
ProjectConfigurationContext(org.eclipse.core.resources.IProject project, org.eclipse.core.runtime.IProgressMonitor monitor)
          Initiate with the IProject providing context.
 
Method Summary
 ConfigurationItem createConfigurationItem(String location, InputStream configuration)
           
 void deleteConfigurationItem(String path)
           
 ConfigurationItem getConfigurationItem(String location)
           
 String getLocation()
           
 org.eclipse.core.resources.IProject getProject()
          Obtain the IProject.
static org.eclipse.core.resources.IProject getProject(org.eclipse.ui.IEditorInput editorInput)
          Obtains the IProject from the input IEditorInput.
 boolean isReadOnly()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectConfigurationContext

public ProjectConfigurationContext(org.eclipse.core.resources.IProject project)
Initiate with the IProject providing context.

Parameters:
project - IProject providing context.

ProjectConfigurationContext

public ProjectConfigurationContext(org.eclipse.ui.IEditorInput editorInput)
Convenience constructor.

Parameters:
editorInput - IEditorInput.

ProjectConfigurationContext

public ProjectConfigurationContext(org.eclipse.core.resources.IProject project,
                                   org.eclipse.core.runtime.IProgressMonitor monitor)
Initiate with the IProject providing context.

Parameters:
project - IProject providing context.
monitor - IProgressMonitor. If only retrieving may specify null.
Method Detail

getProject

public static org.eclipse.core.resources.IProject getProject(org.eclipse.ui.IEditorInput editorInput)
Obtains the IProject from the input IEditorInput.

Parameters:
editorInput - IEditorInput.
Returns:
IProject for the input IEditorInput.

getProject

public org.eclipse.core.resources.IProject getProject()
Obtain the IProject.

Returns:
IProject.

getLocation

public String getLocation()
Specified by:
getLocation in interface ConfigurationContext

getConfigurationItem

public ConfigurationItem getConfigurationItem(String location)
                                       throws Exception
Specified by:
getConfigurationItem in interface ConfigurationContext
Throws:
Exception

isReadOnly

public boolean isReadOnly()
Specified by:
isReadOnly in interface ConfigurationContext

createConfigurationItem

public ConfigurationItem createConfigurationItem(String location,
                                                 InputStream configuration)
                                          throws Exception
Specified by:
createConfigurationItem in interface ConfigurationContext
Throws:
Exception

deleteConfigurationItem

public void deleteConfigurationItem(String path)
                             throws Exception,
                                    ReadOnlyConfigurationException
Specified by:
deleteConfigurationItem in interface ConfigurationContext
Throws:
Exception
ReadOnlyConfigurationException


Copyright © 2005-2013. All Rights Reserved.