Package lumis.portal.clock
Interface IClockManager
-
- All Known Subinterfaces:
IClockManagerSPI
- All Known Implementing Classes:
ClockManager
@StableMinor(version="14.1", sinceVersion="4.0") public interface IClockManager
- Since:
- 4.0.0
- Version:
- $Revision: 24683 $ $Date: 2021-08-23 18:55:58 -0300 (Mon, 23 Aug 2021) $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description String
add(SessionConfig sessionConfig, ClockConfig clockConfig, ITransaction transaction)
Add a clock.void
addOrUpdate(SessionConfig sessionConfig, ClockConfig clockConfig, ITransaction transaction)
Update the configuration of a clock.void
checkSchedule(SessionConfig sessionConfig, ITransaction transaction)
This method is called at regular intervals by thePortalClock
.void
delete(SessionConfig sessionConfig, String clockId, ITransaction transaction)
Delete a clock.void
disable(SessionConfig sessionConfig, String clockId, ITransaction transaction)
Set the "False" value to the enable property of a clock.void
enable(SessionConfig sessionConfig, String clockId, ITransaction transaction)
Set the "True" value to the enable property of a clock.void
executeSchedule(SessionConfig sessionConfig, ClockConfig clockConfig, ITransaction transaction)
Deprecated.Since 5.6.0, replaced by#executeSchedule(SessionConfig,ClockConfig)
.void
executeSchedule(ClockConfig clockConfig)
Executes a clock implementation.ClockConfig
get(SessionConfig sessionConfig, String clockId, ITransaction transaction)
Get the configuration of the clock.Collection<String>
getClockIdsByServiceId(SessionConfig sessionConfig, String serviceId, ITransaction transaction)
Return the Ids of all clocks registered for the specified service.boolean
isPortalClockRunning(SessionConfig sessionConfig, ITransaction transaction)
Verify if the portal clock is running.boolean
setRunning(SessionConfig sessionConfig, String clockId, boolean running, ITransaction transaction)
Sets the running status of a clock in the database.void
update(SessionConfig sessionConfig, ClockConfig clockConfig, ITransaction transaction)
Update the configuration of a clock.
-
-
-
Method Detail
-
checkSchedule
void checkSchedule(SessionConfig sessionConfig, ITransaction transaction) throws ManagerException, PortalException
This method is called at regular intervals by thePortalClock
. The interval period can be configured in the portal config file.- Parameters:
sessionConfig
-transaction
-- Throws:
ManagerException
PortalException
-
executeSchedule
@Deprecated void executeSchedule(SessionConfig sessionConfig, ClockConfig clockConfig, ITransaction transaction) throws ManagerException, PortalException
Deprecated.Since 5.6.0, replaced by#executeSchedule(SessionConfig,ClockConfig)
.Execute a registered clock.- Parameters:
sessionConfig
-clockConfig
-transaction
-- Throws:
ManagerException
PortalException
-
executeSchedule
void executeSchedule(ClockConfig clockConfig) throws PortalException
Executes a clock implementation. Updates the clock scheduling information, such as next run time, accordingly.- Parameters:
clockConfig
- the clock configuration.- Throws:
PortalException
- Since:
- 5.6.0
-
get
ClockConfig get(SessionConfig sessionConfig, String clockId, ITransaction transaction) throws ManagerException, PortalException
Get the configuration of the clock.- Parameters:
sessionConfig
-clockId
-transaction
-- Returns:
- Returns a ClockConfig.
- Throws:
ManagerException
PortalException
-
add
String add(SessionConfig sessionConfig, ClockConfig clockConfig, ITransaction transaction) throws ManagerException, PortalException
Add a clock.- Parameters:
sessionConfig
-clockConfig
-transaction
-- Returns:
- Returns a String.
- Throws:
ManagerException
PortalException
-
addOrUpdate
void addOrUpdate(SessionConfig sessionConfig, ClockConfig clockConfig, ITransaction transaction) throws ManagerException, PortalException
Update the configuration of a clock. If the clock don't exist, it is added to the clock pool.- Parameters:
sessionConfig
-clockConfig
-transaction
-- Throws:
ManagerException
PortalException
-
update
void update(SessionConfig sessionConfig, ClockConfig clockConfig, ITransaction transaction) throws ManagerException, PortalException
Update the configuration of a clock.- Parameters:
sessionConfig
-clockConfig
-transaction
-- Throws:
ManagerException
PortalException
-
delete
void delete(SessionConfig sessionConfig, String clockId, ITransaction transaction) throws ManagerException, PortalException
Delete a clock.- Parameters:
sessionConfig
-clockId
-transaction
-- Throws:
ManagerException
PortalException
-
enable
void enable(SessionConfig sessionConfig, String clockId, ITransaction transaction) throws ManagerException, PortalException
Set the "True" value to the enable property of a clock. If the value of enable property is true the clock will be running.- Parameters:
sessionConfig
-clockId
-transaction
-- Throws:
ManagerException
PortalException
-
disable
void disable(SessionConfig sessionConfig, String clockId, ITransaction transaction) throws ManagerException, PortalException
Set the "False" value to the enable property of a clock. If the value of enable property is false the clock is disable.- Parameters:
sessionConfig
-clockId
-transaction
-- Throws:
ManagerException
PortalException
-
setRunning
boolean setRunning(SessionConfig sessionConfig, String clockId, boolean running, ITransaction transaction) throws ManagerException, PortalException
Sets the running status of a clock in the database. Used mainly by the ClockThreadPool class. This method creates it's own transaction.- Parameters:
sessionConfig
-clockId
-running
-- Returns:
- Returns true if the clock running and false otherwise.
- Throws:
ManagerException
PortalException
-
isPortalClockRunning
boolean isPortalClockRunning(SessionConfig sessionConfig, ITransaction transaction) throws ManagerException, PortalException
Verify if the portal clock is running.- Parameters:
sessionConfig
-transaction
-- Returns:
- Returns true if the portal clock is running and false otherwise.
- Throws:
ManagerException
PortalException
-
getClockIdsByServiceId
Collection<String> getClockIdsByServiceId(SessionConfig sessionConfig, String serviceId, ITransaction transaction) throws ManagerException, PortalException
Return the Ids of all clocks registered for the specified service.- Parameters:
sessionConfig
-serviceId
- The Id of the service whose clocks you want to return.transaction
-- Returns:
- A collection of Strings containing the Ids of the clocks associated with the specified service.
- Throws:
ManagerException
PortalException
-
-