org.mockcentral.editor.nodes.mockobject
Interface IMockObjectDataManager

All Known Implementing Classes:
FixtureModel

public interface IMockObjectDataManager

Interface for classes that manage Mock Object name, interface and JNDI name data.

Author:
David Hutchinson

Method Summary
 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.
 java.util.List<java.lang.String> getMockObjectNames(java.lang.Object excluded)
          Returns the list of Mock Object names within the current Fixture.
 boolean isJndiNameInUse(java.lang.String jndiName, java.lang.Object excluded)
          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 excluded)
          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 excluded)
          Returns an error message indicating an invalid Mock Object name, or null if the supplied name is valid.
 

Method Detail

getDefaultNewMockObjectName

java.lang.String getDefaultNewMockObjectName()
Returns a default value for a new Mock Object name.

Returns:
a default value for a new Mock Object name.

getMockObjectNames

java.util.List<java.lang.String> getMockObjectNames(java.lang.Object excluded)
Returns the list of Mock Object names within the current Fixture.

Parameters:
excluded - an Object the name of which to exclude from the list.
Returns:
the list of Mock Object names within the current Fixture.

isValidMockObjectName

java.lang.String isValidMockObjectName(java.lang.String mockObjectName,
                                       java.lang.Object excluded)
Returns an error message indicating an invalid Mock Object name, or null if the supplied name is valid.

Parameters:
mockObjectName - the name for the Mock Object.
excluded - an Object to exclude from duplicated-name testing.
Returns:
an error message indicating an invalid Mock Object name, or null if the supplied name is valid.

isValidInterface

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.

Parameters:
interfaceName - the class name of the interface.
Returns:
an error message indicating an invalid Mock Object interface, or null if the supplied interface name is valid.

getDefaultNewJndiName

java.lang.String getDefaultNewJndiName()
Returns a default value for a new JNDI name.

Returns:
a default value for a new JNDI name.

isValidJndiName

java.lang.String isValidJndiName(java.lang.String jndiName,
                                 java.lang.Object excluded)
Returns an error message indicating an invalid JNDI name, or null if the supplied JNDI name is valid.

Parameters:
jndiName - the JNDI name.
excluded - the Object being edited, if any, to exclude from duplicate-checking.
Returns:
an error message indicating an invalid JNDI name, or null if the supplied JNDI name is valid.

isJndiNameInUse

boolean isJndiNameInUse(java.lang.String jndiName,
                        java.lang.Object excluded)
Returns whether the supplied JNDI name is currently in use within the Fixture.

Parameters:
jndiName - the JNDI name.
excluded - an Object to exclude from duplicate-checking.
Returns:
whether the supplied JNDI name is currently in use within the Fixture.