org.eclipse.graphiti.ui.features
Class DefaultDeleteFeature

java.lang.Object
  extended by org.eclipse.graphiti.features.impl.AbstractFeature
      extended by org.eclipse.graphiti.ui.features.DefaultDeleteFeature
All Implemented Interfaces:
IDeleteFeature, IFeature, IFeatureProviderHolder, IDescription, IName

public class DefaultDeleteFeature
extends AbstractFeature
implements IDeleteFeature

The Class DefaultDeleteFeature.


Field Summary
private static java.lang.String NAME
           
 
Constructor Summary
DefaultDeleteFeature(IFeatureProvider fp)
          Creates a new DefaultDeleteFeature.
 
Method Summary
 boolean canDelete(IDeleteContext context)
          Can delete.
 boolean canExecute(IContext context)
          Decides if the current feature can execute with the given context.
 void delete(IDeleteContext context)
          Delete.
protected  void deleteBusinessObject(java.lang.Object bo)
          Delete business object.
protected  void deleteBusinessObjects(java.lang.Object[] businessObjects)
          Delete business objects.
 void execute(IContext context)
          Executes the current feature with the given context.
 java.lang.String getName()
          Gets the name.
protected  boolean getUserDecision()
          Gets the user decision.
 void postDelete(IDeleteContext context)
          Post delete.
 void preDelete(IDeleteContext context)
          Pre delete.
 
Methods inherited from class org.eclipse.graphiti.features.impl.AbstractFeature
addGraphicalRepresentation, canUndo, getAllBusinessObjectsForPictogramElement, getBusinessObjectForPictogramElement, getDescription, getDiagram, getDiagramEditor, getFeatureProvider, getProgressCallback, hasDoneChanges, isAvailable, layoutPictogramElement, link, link, manageColor, manageColor, setProgressCallback, toString, updatePictogramElement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.graphiti.features.IFeature
canUndo, hasDoneChanges, isAvailable
 
Methods inherited from interface org.eclipse.graphiti.IDescription
getDescription
 
Methods inherited from interface org.eclipse.graphiti.features.IFeatureProviderHolder
getFeatureProvider
 

Field Detail

NAME

private static final java.lang.String NAME
Constructor Detail

DefaultDeleteFeature

public DefaultDeleteFeature(IFeatureProvider fp)
Creates a new DefaultDeleteFeature.

Parameters:
fp - the feature provider
Method Detail

canDelete

public boolean canDelete(IDeleteContext context)
Description copied from interface: IDeleteFeature
Can delete.

Specified by:
canDelete in interface IDeleteFeature
Parameters:
context - the context
Returns:
true, if successful

delete

public void delete(IDeleteContext context)
Description copied from interface: IDeleteFeature
Delete.

Specified by:
delete in interface IDeleteFeature
Parameters:
context - the context

deleteBusinessObjects

protected void deleteBusinessObjects(java.lang.Object[] businessObjects)
Delete business objects.

Parameters:
businessObjects - the business objects

deleteBusinessObject

protected void deleteBusinessObject(java.lang.Object bo)
Delete business object.

Parameters:
bo - the bo

getUserDecision

protected boolean getUserDecision()
Description copied from class: AbstractFeature
Gets the user decision.

Overrides:
getUserDecision in class AbstractFeature
Returns:
the user decision

preDelete

public void preDelete(IDeleteContext context)
Description copied from interface: IDeleteFeature
Pre delete.

Specified by:
preDelete in interface IDeleteFeature
Parameters:
context - the context

postDelete

public void postDelete(IDeleteContext context)
Description copied from interface: IDeleteFeature
Post delete.

Specified by:
postDelete in interface IDeleteFeature
Parameters:
context - the context

canExecute

public boolean canExecute(IContext context)
Description copied from interface: IFeature
Decides if the current feature can execute with the given context.

Specified by:
canExecute in interface IFeature
Parameters:
context - this is the general input for this method
Returns:
true if the feature can be executed, false if not
See Also:
IContext

execute

public void execute(IContext context)
Description copied from interface: IFeature
Executes the current feature with the given context.

Specified by:
execute in interface IFeature
Parameters:
context - this is the general input for this method
See Also:
IContext

getName

public java.lang.String getName()
Description copied from interface: IName
Gets the name.

Specified by:
getName in interface IName
Overrides:
getName in class AbstractFeature
Returns:
the name


Copyright (c) SAP AG 2005, 2010.