facets.core.app
Class ActionAppSurface

java.lang.Object
  extended by facets.util.Tracer
      extended by facets.core.app.AppSurface
          extended by facets.core.app.ActionAppSurface
All Implemented Interfaces:
SSurface, Notifiable, Titled
Direct Known Subclasses:
FacetAppSurface

public abstract class ActionAppSurface
extends AppSurface

AppSurface defining application actions and management.

ActionAppSurface extends its superclass by

Note: ActionAppSurface is intended for use in concrete applications only via a facet builder subclass.


Nested Class Summary
static class ActionAppSurface.CachingStyle
          Defines management style for ProvidingCache.
 
Nested classes/interfaces inherited from class facets.core.app.AppSurface
AppSurface.ContentCreationException, AppSurface.Contenter, AppSurface.ContentRoot, AppSurface.ContentStyle
 
Field Summary
 AppActions actions
           
static java.lang.String KEY_TIMED_OUT
          Key for debug value.
static java.lang.String KEY_TIMEOUTS
          Key for debug value.
 MemoryChecks memory
           
 AppWatcher watcher
           
 
Fields inherited from class facets.core.app.AppSurface
AREA_APP, AREA_CONTENT, AREA_PAGE, AREA_PANE, contentStyle, emptyContent, spec, TITLE_EMPTY
 
Constructor Summary
protected ActionAppSurface(AppSpecifier spec, AppServices services)
          Unique constructor.
 
Method Summary
protected abstract  ActionAppSurface.CachingStyle cachingStyle()
           
protected abstract  long calculateCacheMb(int maxSafeMb)
           
 boolean contentIsRemovable(AppSurface.Contenter content)
          Implements abstract method.
abstract  Dialogs dialogs()
          Supplies the Dialogs which will launch dialogs from this application surface.
protected  java.lang.Object[] getFixedOpeningContentSources()
           
protected abstract  java.lang.Object getInternalContentSource()
          Return a suitable source for default content, or the content itself.
protected  java.lang.Object[] getOpeningContentSources()
          Implements interface method.
protected  STarget[] lazySurfaceRootElements()
          Implements abstract method.
 void notify(Notice notice)
          Respond to the Notice passed.
protected  void surfaceRetargeted()
          Re-implementation calling AppActions.surfaceRetargeted().
 
Methods inherited from class facets.core.app.AppSurface
activeContentRootTargeter, addContent, buildRetargeted, cloneActiveRoot, contentNotAdded, findActiveContent, firstContentRoot, getViewerContents, isBuilt, isHeadless, newContenter, newEmptyDesktopLayout, newHeadlessHost, newMultiContentFacet, openApp, removeActiveContent, removeActiveRoot, removeAllContent, replaceSingleContent, revertActiveContent, runWatched, surfaceRootTargeter, title
 
Methods inherited from class facets.util.Tracer
trace, trace, trace, trace, trace, traceDebug, traceDebug, traceObjectText, traceOutput, traceOutputWithClass
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface facets.core.superficial.app.SSurface
host
 

Field Detail

KEY_TIMEOUTS

public static final java.lang.String KEY_TIMEOUTS
Key for debug value.

See Also:
Constant Field Values

KEY_TIMED_OUT

public static final java.lang.String KEY_TIMED_OUT
Key for debug value.

See Also:
Constant Field Values

actions

public final AppActions actions

watcher

public final AppWatcher watcher

memory

public final MemoryChecks memory
Constructor Detail

ActionAppSurface

protected ActionAppSurface(AppSpecifier spec,
                           AppServices services)
Unique constructor.

Parameters:
spec - set as final field
services - supplies an AppWatcher and application ProvidingCache
Method Detail

cachingStyle

protected abstract ActionAppSurface.CachingStyle cachingStyle()

calculateCacheMb

protected abstract long calculateCacheMb(int maxSafeMb)

notify

public void notify(Notice notice)
Description copied from interface: Notifiable
Respond to the Notice passed.

When this method is called, the Notifiable should respond based on

Specified by:
notify in interface Notifiable
Overrides:
notify in class AppSurface

surfaceRetargeted

protected final void surfaceRetargeted()
Re-implementation calling AppActions.surfaceRetargeted().

Overrides:
surfaceRetargeted in class AppSurface

lazySurfaceRootElements

protected STarget[] lazySurfaceRootElements()
Implements abstract method.

Returns targets created by AppActions.newSurfaceRootElements().

Overrides:
lazySurfaceRootElements in class AppSurface
Returns:
a non-null (though possibly empty) STarget[]

contentIsRemovable

public final boolean contentIsRemovable(AppSurface.Contenter content)
Implements abstract method.

Specified by:
contentIsRemovable in class AppSurface
Parameters:
content - to be checked
Returns:
response of AppActions.contentIsRemovable(String, AppSurface.Contenter)

getOpeningContentSources

protected final java.lang.Object[] getOpeningContentSources()
Implements interface method.

Specified by:
getOpeningContentSources in class AppSurface
Returns:
suitable source[es] for opening content.

getFixedOpeningContentSources

protected java.lang.Object[] getFixedOpeningContentSources()

getInternalContentSource

protected abstract java.lang.Object getInternalContentSource()
Return a suitable source for default content, or the content itself.

Called from AppActions and from default getFixedOpeningContentSources()


dialogs

public abstract Dialogs dialogs()
Supplies the Dialogs which will launch dialogs from this application surface.