Package lumis.portal.bigdata
Class BigDataManager
- java.lang.Object
-
- lumis.portal.bigdata.BigDataManager
-
- All Implemented Interfaces:
IBigDataManager
,IBigDataManagerSPI
public class BigDataManager extends java.lang.Object implements IBigDataManagerSPI
Creates instances of concreteIBigDataRepository
implementations.- Since:
- 8.1.0
- Version:
- $Revision$ $Date$
-
-
Constructor Summary
Constructors Constructor Description BigDataManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addSynonym(ISynonym synonym)
Adds the given synonyms to be used duringdocument creation
.ISynonym
createSynonym()
void
deleteSynonyms(java.lang.String... synonymIds)
Removes the synonyms with the given identifiers.void
destroy(boolean shutdown)
Destroy all repositories in this manager and free any required resources.IBigDataRepository
getDefaultRepository()
Returns the default big data repository.ISynonym
getSynonymById(java.lang.String synonymId)
Returns the synonym with the given identifier.SynonymsStatus
getSynonymsStatus()
Returns the synonyms status.boolean
isThereSynonymsWithLocale(java.util.Locale locale)
Returns whether there aresynonyms
for the given locale.void
publishSynonyms(boolean forcePublish)
Writes
the synonyms files and reloaded them into therepository
.
Ifstatus
isSynonymsStatus.UPDATED
, nothing will be performed, unlessforcePublish
parameter istrue
.void
updateSynonym(ISynonym synonym)
Updates the given synonyms to be used duringdocument creation
.
-
-
-
Method Detail
-
destroy
public void destroy(boolean shutdown)
Description copied from interface:IBigDataManagerSPI
Destroy all repositories in this manager and free any required resources.- Specified by:
destroy
in interfaceIBigDataManagerSPI
- Parameters:
shutdown
- whether this destroy is due to portal being shutdown. Iftrue
, this manager must not initialize any repository anymore.
-
getDefaultRepository
public IBigDataRepository getDefaultRepository()
Description copied from interface:IBigDataManager
Returns the default big data repository.- Specified by:
getDefaultRepository
in interfaceIBigDataManager
- Returns:
- the default big data repository.
-
createSynonym
public ISynonym createSynonym()
Description copied from interface:IBigDataManager
- Specified by:
createSynonym
in interfaceIBigDataManager
- Returns:
- a new instance of
ISynonym
to beadded
later.
-
addSynonym
public void addSynonym(ISynonym synonym) throws java.lang.IllegalArgumentException, TransactionRequiredException, PortalException
Description copied from interface:IBigDataManager
Adds the given synonyms to be used duringdocument creation
. This operation, however, may not have an instant effect.
Before call this method,IBigDataManager.createSynonym()
must be called to create a new instance, so it can be added.
When calling this method, there must be an activetransaction
and an activeuser's session
. The user calling this, must have themanage portal
permission.- Specified by:
addSynonym
in interfaceIBigDataManager
- Parameters:
synonym
- the synonyms to be added.- Throws:
java.lang.IllegalArgumentException
- if the given synonym isnull
or invalid.TransactionRequiredException
- if there's no active transaction.AccessDeniedException
- if there's no active user session or the given session does not have the required permission.PortalException
- if other error occur.
-
updateSynonym
public void updateSynonym(ISynonym synonym) throws java.lang.IllegalArgumentException, TransactionRequiredException, PortalException
Description copied from interface:IBigDataManager
Updates the given synonyms to be used duringdocument creation
. This operation, however, may not have an instant effect.
When calling this method, there must be an activetransaction
and an activeuser's session
. The user calling this, must have themanage portal
permission.- Specified by:
updateSynonym
in interfaceIBigDataManager
- Parameters:
synonym
- the synonyms to be updated -- it must have been gotten throughIBigDataManager.getSynonymById(String)
.- Throws:
java.lang.IllegalArgumentException
- if the given synonym isnull
or invalid.TransactionRequiredException
- if there's no active transaction.AccessDeniedException
- if there's no active user session or the given session does not have the required permission.PortalException
- if other error occur.
-
deleteSynonyms
public void deleteSynonyms(java.lang.String... synonymIds) throws java.lang.IllegalArgumentException, TransactionRequiredException, PortalException
Description copied from interface:IBigDataManager
Removes the synonyms with the given identifiers. This operation, however, may not have an instant effect.
When calling this method, there must be an activetransaction
and an activeuser's session
. The user calling this, must have themanage portal
permission.- Specified by:
deleteSynonyms
in interfaceIBigDataManager
- Parameters:
synonymIds
- the synonyms identifier.- Throws:
java.lang.IllegalArgumentException
- ifsynonymId
isnull
.TransactionRequiredException
- if there's no active transaction.AccessDeniedException
- if there's no active user session or the given session does not have the required permission.PortalException
- if other error occur.
-
getSynonymById
public ISynonym getSynonymById(java.lang.String synonymId) throws AccessDeniedException, java.lang.IllegalArgumentException, TransactionRequiredException, PortalObjectNotFoundException
Description copied from interface:IBigDataManager
Returns the synonym with the given identifier.
When calling this method, there must be an activetransaction
and an activeuser's session
.- Specified by:
getSynonymById
in interfaceIBigDataManager
- Parameters:
synonymId
- the synonym identifier.- Returns:
- the synonym with the given identifier.
- Throws:
AccessDeniedException
- if there's no active user session.java.lang.IllegalArgumentException
- ifsynonymId
isnull
.TransactionRequiredException
- if there's no active transaction.PortalObjectNotFoundException
- if there's no synonym with the given identifier.
-
isThereSynonymsWithLocale
public boolean isThereSynonymsWithLocale(java.util.Locale locale)
Description copied from interface:IBigDataManagerSPI
Returns whether there aresynonyms
for the given locale.- Specified by:
isThereSynonymsWithLocale
in interfaceIBigDataManagerSPI
- Parameters:
locale
- the locale.- Returns:
- whether there are
synonyms
for the given locale.
-
getSynonymsStatus
public SynonymsStatus getSynonymsStatus() throws TransactionRequiredException
Description copied from interface:IBigDataManagerSPI
Returns the synonyms status.- Specified by:
getSynonymsStatus
in interfaceIBigDataManagerSPI
- Returns:
- the synonyms status.
- Throws:
TransactionRequiredException
- if there's no current active transaction.
-
publishSynonyms
public void publishSynonyms(boolean forcePublish) throws TransactionRequiredException, java.io.IOException, PortalException, java.util.concurrent.TimeoutException
Description copied from interface:IBigDataManagerSPI
Writes
the synonyms files and reloaded them into therepository
.
Ifstatus
isSynonymsStatus.UPDATED
, nothing will be performed, unlessforcePublish
parameter istrue
.- Specified by:
publishSynonyms
in interfaceIBigDataManagerSPI
- Parameters:
forcePublish
- indicates whether the publishing must be performed, even if the synonyms are up-to-date.- Throws:
TransactionRequiredException
- if there's no currently active transaction.java.io.IOException
- if there was an error writing the files.PortalException
- if some error occur.java.util.concurrent.TimeoutException
- if there was a timeout while waiting all the cluster members to write the synonyms files.
-
-