|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mockcentral.editor.nodes.MockCentralNodeModel
org.mockcentral.editor.nodes.fixture.FixtureModel
public class FixtureModel
A class that models data for Mock Object Fixture instances.
| Field Summary |
|---|
| Fields inherited from class org.mockcentral.editor.nodes.MockCentralNodeModel |
|---|
element, node, observers |
| Constructor Summary | |
|---|---|
FixtureModel(FixtureNode node)
Creates a new instance. |
|
| Method Summary | |
|---|---|
void |
addSimpleBoundObject(SimpleBoundObjectModel simpleBoundObjectModel,
boolean refresh)
Adds a new simple JNDI-bound Object to the Fixture. |
void |
deleteSimpleBoundObject(SimpleBoundObjectModel simpleBoundObjectModel,
boolean refresh)
Removes a simple JNDI-bound Object from the Fixture. |
void |
editMockObjects()
Activates the MockObjectGroupNode for this Fixture. |
java.lang.String |
getDefaultNewJndiName()
Returns a default value for a new JNDI name. |
java.lang.String |
getDefaultNewMockObjectName()
Returns a default value for a new Mock Object name. |
FixtureNode |
getEnclosingFixtureNode()
Returns the enclosing FixtureNode. |
java.lang.String |
getFixtureDescription()
Returns the fixture description. |
java.util.List<MockCentralNode> |
getFixtureImportsList()
Returns the list containing the FixtureNode instances for
the Fixtures imported by this one. |
java.lang.String |
getFixtureName()
Returns the fixtureName. |
java.util.ArrayList<java.lang.String> |
getMockObjectNames(java.lang.Object excluded)
Returns the list of Mock Object names within the current Fixture. |
NodeProblem |
getNodeProblem(java.lang.Object o)
Returns the stored NodeProblem associated with the supplied Object, if any. |
java.lang.String |
getNotRemovableMessage()
Returns a message for display indicating why the corresposing MockCentralNode instance cannot be deleted, or null (as this
default implementation does). |
java.util.List<SimpleBoundObjectModel> |
getSimpleBoundObjectsList()
Returns the list of this Fixture's simple (that is, non-Mock) Objects that are to be bound into the naming context at runtime. |
boolean |
isFixtureNameInUse(java.lang.String fixtureName)
Returns whether the supplied Fixture name is already in use within the document. |
boolean |
isJndiNameInUse(java.lang.String jndiName,
java.lang.Object o)
Returns whether the supplied JNDI name is currently in use within the Fixture. |
java.lang.String |
isValidInterface(java.lang.String interfaceName)
Returns an error message indicating an invalid Mock Object interface, or null if the supplied interface name is valid. |
java.lang.String |
isValidJndiName(java.lang.String jndiName,
java.lang.Object o)
Returns an error message indicating an invalid JNDI name, or null if the supplied JNDI name is valid. |
java.lang.String |
isValidMockObjectName(java.lang.String mockObjectName,
java.lang.Object o)
Returns an error message indicating an invalid Mock Object name, or null if the supplied name is valid. |
void |
loadElementData(boolean refreshUI)
Loads the data from the JDOM Element provided by the
MockCentralNode into the model. |
void |
setFixtureData(java.lang.String fixtureName,
java.lang.String fixtureDescription)
Sets the Fixture name and Fixture description values. |
void |
setFixtureImports(java.util.List<MockCentralNode> imports)
Sets the list of imported Fixture instances. |
| Methods inherited from class org.mockcentral.editor.nodes.MockCentralNodeModel |
|---|
addObserver, getElement, getNode, getObservers, registerChanges, removeObserver |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FixtureModel(FixtureNode node)
node - the MockCentralNode containing the JDOM
Element whose data this class models.| Method Detail |
|---|
public void loadElementData(boolean refreshUI)
Element provided by the
MockCentralNode into the model.
loadElementData in class MockCentralNodeModelrefreshUI - whether to send notification to ui components to update
the display.public boolean isFixtureNameInUse(java.lang.String fixtureName)
IFixtureNameEditor
isFixtureNameInUse in interface IFixtureNameEditorfixtureName - the proposed name for the Fixture.
public void setFixtureData(java.lang.String fixtureName,
java.lang.String fixtureDescription)
fixtureName - the value for the Fixture name.fixtureDescription - the value for the Fixture description.public java.lang.String getFixtureName()
public java.lang.String getFixtureDescription()
public void setFixtureImports(java.util.List<MockCentralNode> imports)
Fixture instances.
imports - the list of imported Fixture instances.public java.util.List<MockCentralNode> getFixtureImportsList()
FixtureNode instances for
the Fixtures imported by this one.
FixtureNode instances for
the Fixtures imported by this one.public java.util.List<SimpleBoundObjectModel> getSimpleBoundObjectsList()
public void addSimpleBoundObject(SimpleBoundObjectModel simpleBoundObjectModel,
boolean refresh)
Fixture.
simpleBoundObjectModel - the model for the new Object.refresh - whether the UI should be refreshed after the addition.
public void deleteSimpleBoundObject(SimpleBoundObjectModel simpleBoundObjectModel,
boolean refresh)
Fixture.
simpleBoundObjectModel - the model to remove.refresh - whether the UI should be refreshed after the add.public void editMockObjects()
MockObjectGroupNode for this Fixture.
public boolean isJndiNameInUse(java.lang.String jndiName,
java.lang.Object o)
IMockObjectDataManagerFixture.
isJndiNameInUse in interface IMockObjectDataManagerjndiName - the JNDI name.o - an Object to exclude from duplicate-checking.
Fixture.public java.lang.String getDefaultNewMockObjectName()
IMockObjectDataManager
getDefaultNewMockObjectName in interface IMockObjectDataManagerpublic java.lang.String getDefaultNewJndiName()
IMockObjectDataManager
getDefaultNewJndiName in interface IMockObjectDataManagerpublic java.util.ArrayList<java.lang.String> getMockObjectNames(java.lang.Object excluded)
IMockObjectDataManagerFixture.
getMockObjectNames in interface IMockObjectDataManagerexcluded - an Object the name of which to exclude from the list.
Fixture.
public java.lang.String isValidJndiName(java.lang.String jndiName,
java.lang.Object o)
IMockObjectDataManager
isValidJndiName in interface IMockObjectDataManagerjndiName - the JNDI name.o - the Object being edited, if any, to exclude from
duplicate-checking.
public java.lang.String isValidMockObjectName(java.lang.String mockObjectName,
java.lang.Object o)
IMockObjectDataManager
isValidMockObjectName in interface IMockObjectDataManagermockObjectName - the name for the Mock Object.o - an Object to exclude from duplicated-name testing.
public java.lang.String isValidInterface(java.lang.String interfaceName)
IMockObjectDataManager
isValidInterface in interface IMockObjectDataManagerinterfaceName - the class name of the interface.
public FixtureNode getEnclosingFixtureNode()
MockCentralNodeModelFixtureNode.
getEnclosingFixtureNode in class MockCentralNodeModelFixtureNode.public NodeProblem getNodeProblem(java.lang.Object o)
INodeProblemParticipantNodeProblem associated with the supplied Object, if any.
getNodeProblem in interface INodeProblemParticipanto - the Object which may have an associated NodeProblem.
NodeProblem associated with the supplied Object, if any.public java.lang.String getNotRemovableMessage()
MockCentralNodeModelMockCentralNode instance cannot be deleted, or null (as this
default implementation does).
getNotRemovableMessage in class MockCentralNodeModelMockCentralNode instance cannot be deleted, or null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||