| org.theospi.portfolio.help.HelpManagerImpl
HelpManagerImpl | public class HelpManagerImpl extends HibernateDaoSupport implements HelpManager,HelpFunctionConstants,DownloadableManager(Code) | | This implementation uses the spring config to configure the system, and
uses as a database for indexing resources, and configuring which contexts
are associated with what resources. Lucene is also responsible for
performing help searches.
Contexts are mapped to views in the spring config. To do this, define
a bean of type, org.theospi.portfolio.help.model.HelpContextConfig.
Create a map of contexts which are keyed by the view name. Contexts are
just string ids. An example:
<bean id="presentationHelpContexts" class="org.theospi.portfolio.help.model.HelpContextConfig">
<constructor-arg>
<map>
<entry key="addPresentation1">
<list>
<value>Creating a Presentation</value>
</list>
</entry>
...
An explanation: what this means is that when a user navigates to the
addPresentation1 view a context called "Creating a Presentation" is created.
This context is just an identifier for possible actions the user might perform
from this page.
To create resources define a bean of type, org.theospi.portfolio.help.model.Resource.
The name is the display name that is shown on jsp pages. The location is
the url of the resource. Configure all contexts associated with this resource.
An example,
<bean id="pres_resource_2" class="org.theospi.portfolio.help.model.Resource">
<property name="name"><value>Creating a Presentation</value></property>
<property name="location"><value>${system.baseUrl}/help/creatingPresentations.html</value></property>
<property name="contexts">
<list>
<value>Creating a Presentation</value>
</list>
</property>
</bean>
If all this is configured correctly, when a user navigates to the addPresentation1
view a context of "Creating a Presentation" is created. If the user navigates
to help, the user will be presented with links to all the resources associated with
this context.
See Also: org.theospi.portfolio.help.model.Resource See Also: org.theospi.portfolio.help.model.Source |
Field Summary | |
final protected Log | logger |
Method Summary | |
public GlossaryEntry | addEntry(GlossaryEntry newEntry) | protected boolean | entryExists(GlossaryEntry entry) | protected boolean | entryExists(GlossaryEntry entry, String worksite) | public List | extractEntries(Document document) Given an xml document this reads out the glossary entries. | public AgentManager | getAgentManager() | public AuthorizationFacade | getAuthzManager() | public ContentHostingService | getContentHosting() | public List | getGlobalSiteTypes() | public List | getGlobalSites() | public Glossary | getGlossary() | public Node | getNode(Id artifactId) | public Set | getSortedWorksiteTerms() | protected Id | getToolId() | public ToolManager | getToolManager() | public WorksiteManager | getWorksiteManager() | public Collection | getWorksiteTerms() | public Collection | getWorksiteTerms(String workSite) | public void | importTermsResource(String resourceId, boolean replaceExisting) Given a resource id, this parses out the GlossaryEntries from its input stream.
Once the enties are found, they are inserted into the users current worksite. | public void | importTermsResource(Id worksiteId, String resourceId, boolean replaceExisting) Given a resource id, this parses out the GlossaryEntries from its input stream.
Once the enties are found, they are inserted into the given worksite. | public void | importTermsStream(Id worksiteId, InputStream inStream, boolean replaceExisting) Given an xml File stream, this parses out the GlossaryEntries from the input stream.
Once the enties are found, they are inserted into the given worksite. | public boolean | isGlobal() | public boolean | isMaintainer() | public boolean | isPhraseStart(String phraseFragment) | public String | packageForDownload(Map params, OutputStream out) | public void | packageGlossaryForExport(Id worksiteId, OutputStream os) | public void | putWorksiteTermsIntoZip(Id worksiteId, ZipOutputStream zout) | public void | removeEntry(GlossaryEntry entry) | public void | removeFromSession(Object obj) | public GlossaryEntry | searchGlossary(String keyword) | public void | setAgentManager(AgentManager agentManager) | public void | setAuthzManager(AuthorizationFacade authzManager) | public void | setContentHosting(ContentHostingService contentHosting) | public void | setGlobalSiteTypes(List globalSiteTypes) | public void | setGlobalSites(List globalSites) | public void | setGlossary(Glossary glossary) | public void | setIdManager(IdManager idManager) | public void | setToolManager(ToolManager toolManager) | public void | setWorksiteManager(WorksiteManager worksiteManager) | protected void | storeFileInZip(ZipOutputStream zos, Reader in, String entryName) | public void | updateEntry(GlossaryEntry entry) |
logger | final protected Log logger(Code) | | |
extractEntries | public List extractEntries(Document document) throws UnsupportedFileTypeException(Code) | | Given an xml document this reads out the glossary entries.
Parameters: document - XML Dom Document List of GlossaryEntry |
getGlobalSiteTypes | public List getGlobalSiteTypes()(Code) | | |
getSortedWorksiteTerms | public Set getSortedWorksiteTerms()(Code) | | |
importTermsResource | public void importTermsResource(String resourceId, boolean replaceExisting) throws IOException, UnsupportedFileTypeException, JDOMException(Code) | | Given a resource id, this parses out the GlossaryEntries from its input stream.
Once the enties are found, they are inserted into the users current worksite. If a term exists
in the worksite, then execute based on the last parameter.
Parameters: worksiteId - Id Parameters: resourceId - an String Parameters: replaceExisting - boolean |
importTermsResource | public void importTermsResource(Id worksiteId, String resourceId, boolean replaceExisting) throws IOException, UnsupportedFileTypeException, JDOMException(Code) | | Given a resource id, this parses out the GlossaryEntries from its input stream.
Once the enties are found, they are inserted into the given worksite. If a term exists
in the worksite, then execute based on the last parameter.
Parameters: worksiteId - Id Parameters: resourceId - an String Parameters: replaceExisting - boolean |
importTermsStream | public void importTermsStream(Id worksiteId, InputStream inStream, boolean replaceExisting) throws UnsupportedFileTypeException, JDOMException, IOException(Code) | | Given an xml File stream, this parses out the GlossaryEntries from the input stream.
Once the enties are found, they are inserted into the given worksite. If a term exists
in the worksite, then execute based on the last parameter.
Parameters: worksiteId - Id Parameters: inStream - an xml InputStream Parameters: replaceExisting - boolean |
isGlobal | public boolean isGlobal()(Code) | | |
isMaintainer | public boolean isMaintainer()(Code) | | |
isPhraseStart | public boolean isPhraseStart(String phraseFragment)(Code) | | |
removeFromSession | public void removeFromSession(Object obj)(Code) | | |
setGlobalSiteTypes | public void setGlobalSiteTypes(List globalSiteTypes)(Code) | | |
setGlobalSites | public void setGlobalSites(List globalSites)(Code) | | |
|
|