org.olat.modules.glossary
Class GlossaryManagerImpl

java.lang.Object
  extended by org.olat.modules.glossary.GlossaryManager
      extended by org.olat.modules.glossary.GlossaryManagerImpl

public class GlossaryManagerImpl
extends GlossaryManager

Description:
Manager to create, delete etc. glossary learning resources. The OLAT glossary functionality is based on the core framework glossary / textmarker functions.

Initial Date: 15.01.2009

Author:
Roman Haag, frentix GmbH, roman.haag@frentix.com

Field Summary
 
Fields inherited from class org.olat.modules.glossary.GlossaryManager
GLOSSARY_REPO_REF_IDENTIFYER, INTERNAL_FOLDER_NAME
 
Constructor Summary
GlossaryManagerImpl()
           
 
Method Summary
 java.lang.String archive(java.lang.String archivFilePath, RepositoryEntry repoEntry)
           
 OLATResourceable createCopy(OLATResourceable res, UserRequest ureq)
          Creates a copy of a glossary
 GlossaryResource createGlossary()
          Creates a glossary resource and creates the necessary folders on disk.
 void deleteGlossary(OLATResourceable res)
           
 boolean exportGlossary(java.lang.String glossarySoftkey, java.io.File exportedDataDir)
          Exports the glossary resource to the given export directory
 MediaResource getAsMediaResource(OLATResourceable res)
          Export the glossary as a media resource.
 OlatRootFolderImpl getGlossaryRootFolder(OLATResourceable res)
          Returns the internal glossary folder.
 org.apache.lucene.document.Document getIndexerDocument(RepositoryEntry repositoryEntry, SearchResourceContext searchResourceContext)
          Creates a lucene index document for this glossary
 RepositoryEntryImportExport getRepositoryImportExport(java.io.File importDataDir)
          The import export data container used for course import
 
Methods inherited from class org.olat.modules.glossary.GlossaryManager
getInstance
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlossaryManagerImpl

public GlossaryManagerImpl()
Method Detail

getGlossaryRootFolder

public OlatRootFolderImpl getGlossaryRootFolder(OLATResourceable res)
Returns the internal glossary folder.

Specified by:
getGlossaryRootFolder in class GlossaryManager
Parameters:
res -
Returns:

getIndexerDocument

public org.apache.lucene.document.Document getIndexerDocument(RepositoryEntry repositoryEntry,
                                                              SearchResourceContext searchResourceContext)
Creates a lucene index document for this glossary

Specified by:
getIndexerDocument in class GlossaryManager
Parameters:
repositoryEntry -
searchResourceContext -
Returns:
Document the index document

exportGlossary

public boolean exportGlossary(java.lang.String glossarySoftkey,
                              java.io.File exportedDataDir)
Exports the glossary resource to the given export directory

Specified by:
exportGlossary in class GlossaryManager
Parameters:
glossarySoftkey -
exportedDataDir -
Returns:

getAsMediaResource

public MediaResource getAsMediaResource(OLATResourceable res)
Export the glossary as a media resource. The resource name is set to the resources display name

Specified by:
getAsMediaResource in class GlossaryManager
Parameters:
res -
Returns:

createGlossary

public GlossaryResource createGlossary()
Creates a glossary resource and creates the necessary folders on disk. The glossary will be placed in the resources _unizipped dir to make import / export easier

Specified by:
createGlossary in class GlossaryManager
Returns:

getRepositoryImportExport

public RepositoryEntryImportExport getRepositoryImportExport(java.io.File importDataDir)
The import export data container used for course import

Specified by:
getRepositoryImportExport in class GlossaryManager
Parameters:
importDataDir -
Returns:

deleteGlossary

public void deleteGlossary(OLATResourceable res)
Specified by:
deleteGlossary in class GlossaryManager
Parameters:
res - glossary to be deleted

createCopy

public OLATResourceable createCopy(OLATResourceable res,
                                   UserRequest ureq)
Creates a copy of a glossary

Specified by:
createCopy in class GlossaryManager
Parameters:
res -
ureq -
Returns:
the copy

archive

public java.lang.String archive(java.lang.String archivFilePath,
                                RepositoryEntry repoEntry)
Specified by:
archive in class GlossaryManager