BrightSide Workbench Full Report + Source Code
org.turro.elephant.context.IContext Interface Reference
Inheritance diagram for org.turro.elephant.context.IContext:

Public Member Functions

String getId ()
 
IContext getContext ()
 
String getType ()
 
String getTitle ()
 
String getName ()
 
String getExactName (String lang)
 
String getName (String lang)
 
void setName (String lang, String name)
 
String getIcon ()
 
void setIcon (String icon)
 
String getRedirection ()
 
String getTarget ()
 
IElement getDefaultElement ()
 
IElement getDefaultElement (String type)
 
Set< String > getDefaultLocales ()
 
String[] getLocaleSufixes (String preferredLocale)
 
void setConstructor (IConstructor constructor, String path)
 
String getFullPath ()
 
String getWebPath ()
 
String getPath ()
 
int getLevel ()
 
File getFile ()
 
IContext getParent ()
 
IContext[] getAncestors ()
 
IContext[] getChildren ()
 
IContext[] getSiblings ()
 
void startConstruction () throws ServletException, IOException
 
IConstructor getConstructor ()
 
boolean inPath (IContext context)
 

Detailed Description

IContext represents a single folder within web application context. Root IContext is site's. Root subfolders are context's children. Each context may have zero or more children.

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 32 of file IContext.java.

Member Function Documentation

◆ getAncestors()

IContext [] org.turro.elephant.context.IContext.getAncestors ( )

The returning array for this method has as the first element, the root context, and the last, the calling context.

Returns
An array with context ancestors.

Implemented in org.turro.elephant.impl.context.DefaultContext.

◆ getChildren()

IContext [] org.turro.elephant.context.IContext.getChildren ( )
Returns
An array with context's children.

Implemented in org.turro.elephant.impl.context.DefaultContext.

◆ getConstructor()

IConstructor org.turro.elephant.context.IContext.getConstructor ( )
Returns
Returns current IConstructor.

Implemented in org.turro.elephant.impl.context.DefaultContext.

◆ getContext()

IContext org.turro.elephant.context.IContext.getContext ( )

Allows mixing IElement and IContext and get a reference to context.

Returns
Itself.

Implemented in org.turro.elephant.impl.context.DefaultContext.

◆ getDefaultElement() [1/2]

IElement org.turro.elephant.context.IContext.getDefaultElement ( )
Returns
The IElement that will render in context space.

Implemented in org.turro.elephant.impl.context.DefaultContext.

◆ getDefaultElement() [2/2]

IElement org.turro.elephant.context.IContext.getDefaultElement ( String  type)
Parameters
typeElement's type.
Returns
The IElement that will render in context space by type.

Implemented in org.turro.elephant.impl.context.DefaultContext.

◆ getDefaultLocales()

Set<String> org.turro.elephant.context.IContext.getDefaultLocales ( )
Returns
An array of locales, starting with current context and traversing upp the ancestors tree.

Implemented in org.turro.elephant.impl.context.DefaultContext.

◆ getExactName()

String org.turro.elephant.context.IContext.getExactName ( String  lang)

◆ getFile()

File org.turro.elephant.context.IContext.getFile ( )
Returns
Verbose path for this context.
The file representing this context.

Implemented in org.turro.elephant.impl.context.DefaultContext.

◆ getFullPath()

String org.turro.elephant.context.IContext.getFullPath ( )

Full path intention is to provide an easy way for creating absolute links, starting with a slash.

Returns
Full path for this context, including web application's context.

Implemented in org.turro.elephant.impl.context.DefaultContext.

Here is the caller graph for this function:

◆ getIcon()

String org.turro.elephant.context.IContext.getIcon ( )

Returns the image representing this context.

Returns
URL to icon

Implemented in org.turro.elephant.impl.context.DefaultContext.

◆ getId()

String org.turro.elephant.context.IContext.getId ( )

Identifier is a unique value within Elephant web application.

Returns
Unique identifier.

Implemented in org.turro.elephant.impl.context.DefaultContext.

◆ getLevel()

int org.turro.elephant.context.IContext.getLevel ( )
Returns
Context level, starting from 0 when root.

Implemented in org.turro.elephant.impl.context.DefaultContext.

◆ getLocaleSufixes()

String [] org.turro.elephant.context.IContext.getLocaleSufixes ( String  preferredLocale)

Locale sufixes is a combination of locales in a single request. It's composed by user selection (the cookie 'lang'), navigator preferences and context preferences. Default context's language, first place in getDefaultLocales(), is included as an empty string.

Parameters
preferredLocaleLocale that will take first place.
Returns
An array of locale sufixes.

Implemented in org.turro.elephant.impl.context.DefaultContext.

◆ getName() [1/2]

String org.turro.elephant.context.IContext.getName ( )

Context name is the text that shows in navigators. This method returns the same value than calling getName(null).

Returns
Display name for the context.

Implemented in org.turro.elephant.impl.context.DefaultContext.

◆ getName() [2/2]

String org.turro.elephant.context.IContext.getName ( String  lang)

Context name is the text that shows in navigators.

Parameters
langSpecific locale
Returns
Display name for the context in lang locale.

Implemented in org.turro.elephant.impl.context.DefaultContext.

◆ getParent()

IContext org.turro.elephant.context.IContext.getParent ( )
Returns
Context's parent, null for root context.

Implemented in org.turro.elephant.impl.context.DefaultContext.

◆ getPath()

String org.turro.elephant.context.IContext.getPath ( )
Returns
Relative path for this context. Empty string for root.

Implemented in org.turro.elephant.impl.context.DefaultContext.

Here is the caller graph for this function:

◆ getRedirection()

String org.turro.elephant.context.IContext.getRedirection ( )

When a context has a redirection it never gets selected, instead browser receives a redirection response.

Returns
Redirection for this context.

Implemented in org.turro.elephant.impl.context.DefaultContext.

◆ getSiblings()

IContext [] org.turro.elephant.context.IContext.getSiblings ( )
Returns
An array with context's siblings, including itself.

Implemented in org.turro.elephant.impl.context.DefaultContext.

◆ getTarget()

String org.turro.elephant.context.IContext.getTarget ( )

◆ getTitle()

String org.turro.elephant.context.IContext.getTitle ( )

Context title defaults to context name. Elements can override this value.

Returns
Display name for the context.

Implemented in org.turro.elephant.impl.context.DefaultContext.

◆ getType()

String org.turro.elephant.context.IContext.getType ( )
Returns
Context's type.

Implemented in org.turro.elephant.impl.context.DefaultContext.

◆ getWebPath()

String org.turro.elephant.context.IContext.getWebPath ( )

Works as getFullPath method but takes into account redirections

Returns
Full path for this context, including web application's context and/or redirections.

Implemented in org.turro.elephant.impl.context.DefaultContext.

◆ inPath()

boolean org.turro.elephant.context.IContext.inPath ( IContext  context)

This method is used by navigators in order to check whether a context exists in currently selected context. Therefore a call like context.inPath(current) must return true if context is one of current ancestors.

Parameters
contextA context to check its path with.
Returns
True if calling context is in context parameter path.

Implemented in org.turro.elephant.impl.context.DefaultContext.

◆ setConstructor()

void org.turro.elephant.context.IContext.setConstructor ( IConstructor  constructor,
String  path 
)

This method gets authomatically called from ContextFactory. Its intention is to set constructor and context path.

Parameters
constructorConstructor that generated context creation.
pathContext's relative path, starting with a slash or empty for root context.

Implemented in org.turro.elephant.impl.context.DefaultContext.

Here is the caller graph for this function:

◆ setIcon()

void org.turro.elephant.context.IContext.setIcon ( String  icon)

Sets the image that represents this context.

Parameters
iconURL to icon.

Implemented in org.turro.elephant.impl.context.DefaultContext.

◆ setName()

void org.turro.elephant.context.IContext.setName ( String  lang,
String  name 
)

Sets context's name in the given locale.

Parameters
langSpecific locale.
nameContext name.

Implemented in org.turro.elephant.impl.context.DefaultContext.

◆ startConstruction()

void org.turro.elephant.context.IContext.startConstruction ( ) throws ServletException, IOException

Start construction should be aware of which layout is being used, in order to give an initialization code. This is done automatically by ILayoutManager, returned by ContextFactory.

Exceptions
javax.servlet.ServletException
java.io.IOException

Implemented in org.turro.elephant.impl.context.DefaultContext.


The documentation for this interface was generated from the following file: