Class
caplin.layout.testing

LayoutServiceStub

A stub implementation of the caplin.layout.LayoutService that can be used as a replacement for the real implementation in workbenches and tests.

This class shouldn't be instantiated directly. It is available trough the service registry under the caplin.layout-service alias when you are running the "dev" scenario (workbench and tests).

Constructor Summary

Attributes Name and Description
caplin.layout.testing.LayoutServiceStub()

Field Summary

Attributes Name and Description
<static> caplin.layout.testing.LayoutServiceStub.EVENT_NAMES

A map of events that this class will trigger.

Method Summary

Attributes Name and Description
void close( layout)

Triggers a REQUESTED.CLOSE event.

caplin.layout.testing.LayoutStub createLayout(String name, Boolean isClosable)

Creates a new caplin.layout.testing.LayoutStub.

void doClose( layout)

Perform the actual closing of the layout.

void doOpen( layout)

Perform the actual opening of the layout.

void doSave( layout)

Perform the actual save of the layout.

void doSelect( layout)

Perform the actual selection of the layout.

void getAvailable()

void getOpen()

void getSelected()

void open( layout)

Triggers a REQUESTED.OPEN event.

void removeLayout( layout)

Removes the layout.

void save( layout)

Triggers a REQUESTED.SAVE event.

void select( layout)

Triggers a REQUESTED.SELECT event.

void startEventProxy()

Starts the event proxy which automatically responds to any "-requested" events and calls the corresponding "do" method on the stub layout service.

void stopEventProxy()

Stops the event proxy.

Constructor Detail

caplin.layout.testing.LayoutServiceStub()

Field Detail

<static> caplin.layout.testing.LayoutServiceStub.EVENT_NAMES

A map of events that this class will trigger.

Method Detail

void close( layout)

Triggers a REQUESTED.CLOSE event.

Parameters
layout
See
caplin.layout.LayoutService#close

caplin.layout.testing.LayoutStub createLayout(String name, Boolean isClosable)

Creates a new caplin.layout.testing.LayoutStub.

Parameters
String name (optional) Name of the new layout.
Boolean isClosable (optional) Can the newly created layout be closed or not.
Returns
{caplin.layout.testing.LayoutStub}

void doClose( layout)

Perform the actual closing of the layout.

Parameters
layout
See
caplin.layout.LayoutService#close

void doOpen( layout)

Perform the actual opening of the layout.

Parameters
layout
See
caplin.layout.LayoutService#open

void doSave( layout)

Perform the actual save of the layout.

Parameters
layout
See
caplin.layout.LayoutService#save

void doSelect( layout)

Perform the actual selection of the layout.

Parameters
layout
See
caplin.layout.LayoutService#select

void getAvailable()

See
caplin.layout.LayoutService#getAvailable

void getOpen()

See
caplin.layout.LayoutService#getOpen

void getSelected()

See
caplin.layout.LayoutService#getSelected

void open( layout)

Triggers a REQUESTED.OPEN event.

Parameters
layout
See
caplin.layout.LayoutService#open

void removeLayout( layout)

Removes the layout.

Parameters
layout

void save( layout)

Triggers a REQUESTED.SAVE event.

Parameters
layout
See
caplin.layout.LayoutService#save

void select( layout)

Triggers a REQUESTED.SELECT event.

Parameters
layout
See
caplin.layout.LayoutService#select

void startEventProxy()

Starts the event proxy which automatically responds to any "-requested" events and calls the corresponding "do" method on the stub layout service.

void stopEventProxy()

Stops the event proxy.