Package com.carfey.ops.api.embedded
Class ScheduleAliasManager
- java.lang.Object
-
- com.carfey.ops.api.embedded.AbstractAPIManager
-
- com.carfey.ops.api.embedded.ScheduleAliasManager
-
public class ScheduleAliasManager extends AbstractAPIManager
Class to manageScheduleAliases using the Obsidian public embedded API. SeeAbstractAPIManagerfor details on how transactions are managed within all requests.- Since:
- 5.0
- See Also:
- Embedded API Wiki, REST API Wiki
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.carfey.ops.api.embedded.AbstractAPIManager
AbstractAPIManager.ActionCallable
-
-
Constructor Summary
Constructors Constructor Description ScheduleAliasManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScheduleAliasaddOrUpdateScheduleAlias(java.lang.String alias, java.lang.String schedule, java.lang.String auditUser)Creates or updates a schedule alias.ScheduleAliasdeleteScheduleAlias(java.lang.String alias, java.lang.String auditUser)Deletes the schedule alias with the supplied alias.ScheduleAliasgetScheduleAlias(java.lang.String alias)Provides details on a a defined schedule alias.ScheduleAliasListinglistScheduleAliases()Loads all existingScheduleAliases.-
Methods inherited from class com.carfey.ops.api.embedded.AbstractAPIManager
addParameter, runApiTarget, validateRequired, withTransaction
-
-
-
-
Method Detail
-
listScheduleAliases
public ScheduleAliasListing listScheduleAliases() throws java.lang.Exception
Loads all existingScheduleAliases.- Returns:
ScheduleAliasListingcontaining all configuredScheduleAliases (never null)- Throws:
java.lang.Exception- Any type of unexpected exception.
-
addOrUpdateScheduleAlias
public ScheduleAlias addOrUpdateScheduleAlias(java.lang.String alias, java.lang.String schedule, java.lang.String auditUser) throws java.lang.Exception
Creates or updates a schedule alias. If one exists with the alias name, it will be updated.- Parameters:
alias- Schedule alias name (starts with @).schedule- Schedule that is represented by the aliasauditUser- Optional user that is marked in audit columns. Defaults to "embeddedAPI".- Returns:
- the added or updated
ScheduleAlias - Throws:
java.lang.Exception- Any type of unexpected exception.
-
getScheduleAlias
public ScheduleAlias getScheduleAlias(java.lang.String alias) throws java.lang.Exception
Provides details on a a defined schedule alias.- Parameters:
alias- Schedule alias name (starts with @).- Returns:
- the
ScheduleAliaswith the matching alias (or null). - Throws:
java.lang.Exception- Any type of unexpected exception.
-
deleteScheduleAlias
public ScheduleAlias deleteScheduleAlias(java.lang.String alias, java.lang.String auditUser) throws java.lang.Exception
Deletes the schedule alias with the supplied alias. If none exists, this is a no-op.- Parameters:
alias- Schedule alias name (starts with @).auditUser- Optional user that is marked in audit columns. Defaults to "embeddedAPI".- Returns:
- the
ScheduleAliasthat was deleted (or null). - Throws:
java.lang.Exception- Any type of unexpected exception.
-
-