g-Eclipse
Release 1.0.0

eu.geclipse.ui.problems
Class RemountSolution

java.lang.Object
  extended by eu.geclipse.ui.problems.RemountSolution
All Implemented Interfaces:
ISolution, ISolver

public class RemountSolution
extends java.lang.Object
implements ISolution

Solution for "Mount with this name already exists" problem. It opens new connection wizard for the same storage element. User then can easily change mount name to create a connection.


Constructor Summary
RemountSolution(IMountable mountable, IMountable.MountPointID mountID)
          Constructor.
 
Method Summary
 java.lang.String getDescription()
          Get a brief text that gives a description of this solution.
 java.lang.String getID()
          Get this solution's ID.
 boolean isActive()
          Determine if this solution is active.
 void solve()
          Try to solve an associated problem.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RemountSolution

public RemountSolution(IMountable mountable,
                       IMountable.MountPointID mountID)
Constructor. Parameters should not be null.

Parameters:
mountable - The IMountable, for which the mount failed.
mountID - The IMountable.MountPointID of the mounted element.
Method Detail

getDescription

public java.lang.String getDescription()
Description copied from interface: ISolution
Get a brief text that gives a description of this solution.

Specified by:
getDescription in interface ISolution
Returns:
This solutions description.

getID

public java.lang.String getID()
Description copied from interface: ISolution
Get this solution's ID.

Specified by:
getID in interface ISolution
Returns:
The solution's unique identifier or null if this solution was created programmatically.

isActive

public boolean isActive()
Description copied from interface: ISolution
Determine if this solution is active. An active solution has to provide a reasonable implementation of the ISolver.solve()-method in order to solve the associated problem(s). Non-active solutions are called passive solutions and only contain a descriptive text that may give the user hints how to solve the associated problem.

Specified by:
isActive in interface ISolution
Returns:
True if this solution is active, false for passive solutions.

solve

public void solve()
           throws java.lang.reflect.InvocationTargetException
Description copied from interface: ISolver
Try to solve an associated problem.

Specified by:
solve in interface ISolver
Throws:
java.lang.reflect.InvocationTargetException - If an exception occurs during the attempt to solve the problem. The exception will be wrapped by an InvocationTargetException.

g-Eclipse
Release 1.0.0