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 "requested" events that will get triggered when user code interacts with the caplin.layout-service service.

Method Summary

Attributes Name and Description
void close( layout)

Triggers a REQUESTED.CLOSE event.

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

Creates a new caplin.layout.testing.LayoutStub.

caplin.layout.testing.LayoutTemplateStub createLayoutTemplate(String name)

Creates a new caplin.layout.testing.LayoutTemplateStub.

void dispose( layout)

Triggers a REQUESTED.DISPOSE event.

void doClose( layout)

Perform the actual closing of the layout.

void doDispose( layout)

Perform the actual deleting of the layout.

void doOpen( layout)

Perform the actual opening of the layout.

void doOpenNew( template)

Perform the actual openening of a new layout.

void doSave( layout)

Perform the actual save of the layout.

void doSaveAs( layout, name)

Perform the actual save as of the layout.

void doSelect( layout)

Perform the actual selection of the layout.

void getAvailable()

void getOpen()

void getSelected()

void getTemplates()

void open( layout)

Triggers a REQUESTED.OPEN event.

void openNew( template)

Triggers a REQUESTED.OPEN_NEW event.

void save( layout)

Triggers a REQUESTED.SAVE event.

void saveAs( layout, name)

Triggers a REQUESTED.SAVE_AS 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 "requested" events that will get triggered when user code interacts with the caplin.layout-service service.

Contains the following events:

REQUESTED.OPEN

Triggered when caplin.layout.LayoutService#open is called.

PARAMETERS
caplin.layout.LayoutlayoutThe layout to be opened.
REQUESTED.OPEN_NEW
Triggered when caplin.layout.LayoutService#openNew is called.
PARAMETERS
caplin.layout.LayoutTemplatetemplateThe layout template to be opened.
REQUESTED.SELECT
Triggered when caplin.layout.LayoutService#select is called.
PARAMETERS
caplin.layout.LayoutlayoutThe layout to be selected.
REQUESTED.CLOSE
Triggered when caplin.layout.LayoutService#close is called.
PARAMETERS
caplin.layout.LayoutlayoutThe layout to be closed.
REQUESTED.SAVE
Triggered when caplin.layout.LayoutService#save is called.
PARAMETERS
caplin.layout.LayoutlayoutThe layout to be saved.
REQUESTED.SAVE_AS
Triggered when caplin.layout.LayoutService#saveAs is called.
PARAMETERS
caplin.layout.LayoutlayoutThe layout to be saved.
StringnameThe name to be given to the new layout.
REQUESTED.DISPOSE
Triggered when caplin.layout.LayoutService#dispose is called.
PARAMETERS
caplin.layout.LayoutlayoutThe layout to be disposed.

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, isWritable)

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.
isWritable
Returns
{caplin.layout.testing.LayoutStub}

caplin.layout.testing.LayoutTemplateStub createLayoutTemplate(String name)

Creates a new caplin.layout.testing.LayoutTemplateStub.

Parameters
String name (optional) Name of the new template.
Returns
{caplin.layout.testing.LayoutTemplateStub}

void dispose( layout)

Triggers a REQUESTED.DISPOSE event.

Parameters
layout
See
caplin.layout.LayoutService#dispose

void doClose( layout)

Perform the actual closing of the layout.

Parameters
layout
See
caplin.layout.LayoutService#close

void doDispose( layout)

Perform the actual deleting of the layout.

Parameters
layout
See
caplin.layout.LayoutService#dispose

void doOpen( layout)

Perform the actual opening of the layout.

Parameters
layout
See
caplin.layout.LayoutService#open

void doOpenNew( template)

Perform the actual openening of a new layout.

Parameters
template
See
caplin.layout.LayoutService#openNew

void doSave( layout)

Perform the actual save of the layout.

Parameters
layout
See
caplin.layout.LayoutService#save

void doSaveAs( layout, name)

Perform the actual save as of the layout.

Parameters
layout
name
See
caplin.layout.LayoutService#saveAs

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 getTemplates()

See
caplin.layout.LayoutService#getTemplates

void open( layout)

Triggers a REQUESTED.OPEN event.

Parameters
layout
See
caplin.layout.LayoutService#open

void openNew( template)

Triggers a REQUESTED.OPEN_NEW event.

Parameters
template
See
caplin.layout.LayoutService#openNew

void save( layout)

Triggers a REQUESTED.SAVE event.

Parameters
layout
See
caplin.layout.LayoutService#save

void saveAs( layout, name)

Triggers a REQUESTED.SAVE_AS event.

Parameters
layout
name
See
caplin.layout.LayoutService#saveAs

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.