Interface IApplication
-
- All Superinterfaces:
IActivity
,org.eclipse.core.runtime.IAdaptable
,IAttributeStore<Object>
,ch.ivyteam.ivy.system.IConfigurationPropertyProvider
,ICustomPropertyProvider
,ISystemEventDispatcher
public interface IApplication extends IActivity, org.eclipse.core.runtime.IAdaptable, IAttributeStore<Object>, ch.ivyteam.ivy.system.IConfigurationPropertyProvider, ISystemEventDispatcher, ICustomPropertyProvider
Interface IApplication supports access to information about a ivy Application- API:
- This is a public API.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface ch.ivyteam.ivy.event.ISystemEventDispatcher
ISystemEventDispatcher.DispatchStatus
-
-
Field Summary
Fields Modifier and Type Field Description static String
DESIGNER_APPLICATION_NAME
The name of the application on the designer (is always the same)static String
SYSTEM_APPLICATION_NAME
System application name
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description IExternalDatabaseDefaultConfiguration
createExternalDatabaseConfiguration(String userFriendlyName, DatabaseConnectionConfiguration connectionConfiguration, int maxConnections)
Creates a new external database configurationdefault IExternalDatabaseDefaultConfiguration
createExternalDatabaseConfiguration(String userFriendlyName, DatabaseConnectionConfiguration connectionConfiguration, EnumSet<ExternalDatabaseConfigurationAccessFlag> accessFlags, int maxConnections)
IProcessModel
createProcessModel(String processModelName, String description)
Creates a new process model within the applicationstatic IApplication
current()
Gets the current application.void
deleteExternalDatabaseConfiguration(String userFriendlyName)
Deletes an external database configurationvoid
deleteProcessModel(String processModelName)
Deletes a process modelIExternalDatabaseConfiguration
findExternalDatabaseConfiguration(String userFriendlyName)
Find an external database configuration with a name of the configuration.IProcessModel
findProcessModel(Object identifier)
Finds a process model by its identifierIProcessModel
findProcessModel(String processModelName)
Finds a process model by its nameIProcessModelVersion
findProcessModelVersion(String processModelVersionUrl)
Finds a process model version with the procesModelVersionUrl or procesModelUrlString
getActiveEnvironment()
Returns the active environment of the application.IEnvironment
getActualEnvironment()
Determines the actual environment.IBusinessCalendarSettings
getBusinessCalendarSettings()
Returns theIBusinessCalendarSettings
to accessIBusinessCalendarConfiguration
sLocale
getDefaultEMailLanguage()
Gets the default email language of this application.IEMailNotificationSettings
getDefaultEMailNotifcationSettings()
Gets the default email notification settings of this application.String
getDescription()
Returns the descriptionList<IExternalDatabaseConfiguration>
getExternalDatabaseConfigurations()
Gets the external database configurations with the values depending on the actual environmentFile
getFileArea()
Gets the directory where the persistent files that can be accessed with the IvyScript File type are stored for this application.String
getFileDirectory()
Returns the directory where the files of the application are stored (in this directory, there are different directories for each project and then in each directory different directories for each version...)long
getId()
Gets the identifier of the applicationList<ILibrary>
getLibraries()
Gets all liberariesString
getName()
Returns the name of the applicationString
getOwnerName()
Gets the owner nameList<IProcessModel>
getProcessModels()
Gets all process modelsList<IProcessModel>
getProcessModelsSortedByName()
Gets all process models sorted by the name of the process modelsISecurityContext
getSecurityContext()
Gets the security context of this applicationISecurityDescriptor
getSecurityDescriptor()
Gets the security descriptor of the applicationFile
getSessionFileArea()
Gets the directory where the temporary IvyScript Files for the current session are stored.boolean
isDefaultFileDirectory()
Deprecated.always returns false since there is no such things like a default file directoryboolean
isSystem()
Returns true if this application is the system applicationvoid
setActiveEnvironment(String environment)
Set the environment for the application.void
setBusinessCalendar(IBusinessCalendar calendar)
Defines theIBusinessCalendar
for thisIApplication
.void
setDefaultEMailLanguage(Locale emailLanguage)
Sets the default email language of this application.void
setDefaultEMailNotifcationSettings(IEMailNotificationSettings settings)
Sets the default email notification settings of this application.void
setDescription(String description)
Sets the descriptionvoid
setFileDirectory(String directory)
Set the data directory where the files of the application are stored (in this directory, there are different directories for each project and then in each directory different directories for each version...)void
setOwnerName(String ownerName)
Sets the owner name-
Methods inherited from interface ch.ivyteam.ivy.application.IActivity
activate, deactivate, getActivityOperationState, getActivityState, lock
-
Methods inherited from interface ch.ivyteam.util.IAttributeStore
getAttribute, getAttributeNames, removeAttribute, setAttribute
-
Methods inherited from interface ch.ivyteam.ivy.application.property.ICustomPropertyProvider
customProperties
-
Methods inherited from interface ch.ivyteam.ivy.event.ISystemEventDispatcher
addSystemEventListener, removeSystemEventListener, sendSystemEvent
-
-
-
-
Field Detail
-
SYSTEM_APPLICATION_NAME
static final String SYSTEM_APPLICATION_NAME
System application name- See Also:
- Constant Field Values
- API:
- This public API is available in Java.
-
DESIGNER_APPLICATION_NAME
static final String DESIGNER_APPLICATION_NAME
The name of the application on the designer (is always the same)- See Also:
- Constant Field Values
- API:
- This public API is available in Java.
-
-
Method Detail
-
getId
long getId()
Gets the identifier of the application- Returns:
- the identifier
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
getName
String getName()
Returns the name of the application- Returns:
- name
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
- Security:
- SESSION OWNS ApplicationReadName PERMISSION OR OWNS ApplicationReadName@SYSTEM PERMISSION
-
getDescription
String getDescription()
Returns the description- Returns:
- description
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
- Security:
- SESSION OWNS ApplicationReadDescription PERMISSION OR OWNS ApplicationReadDescription@SYSTEM PERMISSION
-
setDescription
void setDescription(String description)
Sets the description- Parameters:
description
- The description of the application- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- SESSION OWNS ApplicationWriteDescription PERMISSION OR OWNS ApplicationWriteDescription@SYSTEM PERMISSION
-
getFileDirectory
String getFileDirectory()
Returns the directory where the files of the application are stored (in this directory, there are different directories for each project and then in each directory different directories for each version...)- Returns:
- the directory where the files of the application are stored
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- SESSION OWNS ApplicationReadFileDirectory PERMISSION OR OWNS ApplicationReadFileDirectory@SYSTEM PERMISSION
-
getFileArea
File getFileArea()
Gets the directory where the persistent files that can be accessed with the IvyScript File type are stored for this application. The returned location is relative to the application's general file directory, which is accessible withgetFileDirectory()
.- Returns:
- persistent file area directory
- Throws:
PersistencyException
- if persistency access fails- See Also:
getSessionFileArea()
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
getSessionFileArea
File getSessionFileArea()
Gets the directory where the temporary IvyScript Files for the current session are stored. The returned location is relative to the application's general file directory, which is accessible withgetFileDirectory()
.- Returns:
- temporary file area directory for current session
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
- Security:
- SESSION OWNS ApplicationReadFileAreaDirectory PERMISSION OR OWNS ApplicationReadFileAreaDirectory@SYSTEM PERMISSION
-
setFileDirectory
void setFileDirectory(String directory)
Set the data directory where the files of the application are stored (in this directory, there are different directories for each project and then in each directory different directories for each version...)- Parameters:
directory
- The directory where the files of the application are stored (null means default directory)- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- SESSION OWNS ApplicationWriteFileDirectory PERMISSION OR OWNS ApplicationWriteFileDirectory@SYSTEM PERMISSION
-
setOwnerName
void setOwnerName(String ownerName)
Sets the owner name- Parameters:
ownerName
- The new owner name- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- SESSION OWNS ApplicationWriteOwnerName PERMISSION OR OWNS ApplicationWriteOwnerName@SYSTEM PERMISSION
-
getOwnerName
String getOwnerName()
Gets the owner name- Returns:
- owner name
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- SESSION OWNS ApplicationReadOwnerName PERMISSION OR OWNS ApplicationReadOwnerName@SYSTEM PERMISSION
-
findProcessModel
IProcessModel findProcessModel(String processModelName)
Finds a process model by its name- Parameters:
processModelName
- Name of the process model- Returns:
- process model or null if no process model with the name exists
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
- Security:
- SESSION OWNS ProcessModelRead PERMISSION OR OWNS ProcessModelRead@SYSTEM PERMISSION
-
findProcessModel
IProcessModel findProcessModel(Object identifier)
Finds a process model by its identifier- Parameters:
identifier
- process model identifier- Returns:
- process model or null
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
- Security:
- SESSION OWNS ProcessModelRead PERMISSION OR OWNS ProcessModelRead@SYSTEM PERMISSION
-
findProcessModelVersion
IProcessModelVersion findProcessModelVersion(String processModelVersionUrl)
Finds a process model version with the procesModelVersionUrl or procesModelUrl- Parameters:
processModelVersionUrl
- of the process model version- Returns:
- process model version or null
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
- Security:
- SESSION OWNS ProcessModelVersionRead PERMISSION OR OWNS ProcessModelVersionRead@SYSTEM PERMISSION
-
createProcessModel
IProcessModel createProcessModel(String processModelName, String description)
Creates a new process model within the application- Parameters:
processModelName
- The process model namedescription
- Description of the process model- Returns:
- created process model or null if processModelName isn't unique
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- SESSION OWNS ProcessModelCreate PERMISSION OR OWNS ProcessModelCreate@SYSTEM PERMISSION
-
deleteProcessModel
void deleteProcessModel(String processModelName)
Deletes a process model- Parameters:
processModelName
- The name of the process model- Throws:
PersistencyException
- If db access failsPersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- SESSION OWNS ProcessModelDelete PERMISSION OR OWNS ProcessModelDelete@SYSTEM PERMISSION
-
getProcessModels
List<IProcessModel> getProcessModels()
Gets all process models- Returns:
- unmodifiable list with all process models
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
- Security:
- SESSION OWNS ProcessModelReadAll PERMISSION OR OWNS ProcessModelReadAll@SYSTEM PERMISSION
-
getProcessModelsSortedByName
List<IProcessModel> getProcessModelsSortedByName()
Gets all process models sorted by the name of the process models- Returns:
- unmodifiable list with all process models sorted by name
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
- Security:
- SESSION OWNS ProcessModelReadAll PERMISSION OR OWNS ProcessModelReadAll@SYSTEM PERMISSION
-
isDefaultFileDirectory
@Deprecated boolean isDefaultFileDirectory()
Deprecated.always returns false since there is no such things like a default file directoryThere is no use for this method because there is no such thing like a default file directory.
Because this method is marked as Public API it cannot be removed yet. All code that uses this method should be rewritten to avoid using this method because the method will be removed in one of the next releases..- Returns:
- always false
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
isSystem
boolean isSystem()
Returns true if this application is the system application- Returns:
- true if system application, otherwise false
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- SESSION OWNS ApplicationReadName PERMISSION OR OWNS ApplicationReadName@SYSTEM PERMISSION
-
getSecurityDescriptor
ISecurityDescriptor getSecurityDescriptor()
Gets the security descriptor of the application- Returns:
- the security descriptor
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
getSecurityContext
ISecurityContext getSecurityContext()
Gets the security context of this application- Returns:
- security context
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
getExternalDatabaseConfigurations
List<IExternalDatabaseConfiguration> getExternalDatabaseConfigurations()
Gets the external database configurations with the values depending on the actual environment- Returns:
- external database configurations
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
- Security:
- SESSION OWNS ExternalDatabaseConfigurationRead PERMISSION OR OWNS ExternalDatabaseConfigurationRead@SYSTEM PERMISSION
-
findExternalDatabaseConfiguration
IExternalDatabaseConfiguration findExternalDatabaseConfiguration(String userFriendlyName)
Find an external database configuration with a name of the configuration. If an active environment is set, then the environment configuration will be returned. If no environment configuration for this database was found, the default configuration will be returned Use environment of the current session. This method calls the session method- Parameters:
userFriendlyName
- the configuration name- Returns:
- external database configuration or null
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
- Security:
- SESSION OWNS ExternalDatabaseConfigurationRead PERMISSION OR OWNS ExternalDatabaseConfigurationRead@SYSTEM PERMISSION
-
createExternalDatabaseConfiguration
IExternalDatabaseDefaultConfiguration createExternalDatabaseConfiguration(String userFriendlyName, DatabaseConnectionConfiguration connectionConfiguration, int maxConnections)
Creates a new external database configuration- Parameters:
userFriendlyName
- the configuration nameconnectionConfiguration
- configuration of the connection to the external database that external databasemaxConnections
- The max number of connection that should be established to the external database- Returns:
- new external database configuration
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- SESSION OWNS ExternalDatabaseConfigurationCreate PERMISSION OR OWNS ExternalDatabaseConfigurationCreate@SYSTEM PERMISSION
-
deleteExternalDatabaseConfiguration
void deleteExternalDatabaseConfiguration(String userFriendlyName)
Deletes an external database configuration- Parameters:
userFriendlyName
- the name of the configuration to delete- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- SESSION OWNS ExternalDatabaseConfigurationDelete PERMISSION OR OWNS ExternalDatabaseConfigurationDelete@SYSTEM PERMISSION
-
getLibraries
List<ILibrary> getLibraries()
Gets all liberaries- Returns:
- list with libraries. Maybe empty, never null.
- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- SESSION OWNS LibraryReadAll PERMISSION OR OWNS LibraryReadAll@SYSTEM PERMISSION
-
setActiveEnvironment
void setActiveEnvironment(String environment)
Set the environment for the application.
This settings could be overriden by
ISession.setActiveEnvironment(String)
and/or ICase.setActiveEnvironment(String)- Parameters:
environment
- name of the environment. Usenull
or an empty string to set the default environment- Throws:
PersistencyException
- if persistency access failsNoSuchElementException
- if the environment does not exist- See Also:
getActualEnvironment()
,getActualEnvironment(ISession)
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
getActiveEnvironment
String getActiveEnvironment()
Returns the active environment of the application.
Use
getActualEnvironment()
to get the actual environment.- Returns:
- name of the active environment or null if not set (i.e. the default environment is set)
- Throws:
PersistencyException
- If persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
getActualEnvironment
IEnvironment getActualEnvironment()
Determines the actual environment. The priority is as follows:
- CaseEnvironment
- SessionEnvironment
- ApplicationEnvironment
- DefaultEnvironment
Use the
setActiveEnvironment(String)
method on ICase, ISession or IApplication to control the actual environment.- Returns:
- the actual environment set on the case, the session, the application or the default environment if none is set
- Throws:
PersistencyException
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
getDefaultEMailNotifcationSettings
IEMailNotificationSettings getDefaultEMailNotifcationSettings()
Gets the default email notification settings of this application. If not set or is set tonull
, default settings are returned, nevernull
.This settings are used if the user settings define to use the application default (see
IUserEMailNotificationSettings.isUseApplicationDefault()
).- Returns:
- the default email notification settings of this application, never
null
. - Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
setDefaultEMailNotifcationSettings
void setDefaultEMailNotifcationSettings(IEMailNotificationSettings settings)
Sets the default email notification settings of this application.This settings are used if the user settings define to use the application default (see
IUserEMailNotificationSettings.isUseApplicationDefault()
).- Parameters:
settings
- the default email notification settings of this application, can benull
.- Throws:
PersistencyException
- if persistency access fails- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
getDefaultEMailLanguage
Locale getDefaultEMailLanguage()
Gets the default email language of this application. If not set or is set tonull
,Locale.ENGLISH
is returned, nevernull
.This language is used if the email language property of the user is
null
.- Returns:
- the default email notification settings of this application, never
null
. - Throws:
PersistencyException
- if persistency access fails- See Also:
setDefaultEMailLanguage(Locale)
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
setDefaultEMailLanguage
void setDefaultEMailLanguage(Locale emailLanguage)
Sets the default email language of this application.This language is used if the email language property of the user is
null
.- Parameters:
emailLanguage
- the default email language of this application, can benull
.- Throws:
PersistencyException
- if persistency access fails- See Also:
getDefaultEMailLanguage()
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
getBusinessCalendarSettings
IBusinessCalendarSettings getBusinessCalendarSettings()
Returns theIBusinessCalendarSettings
to accessIBusinessCalendarConfiguration
s- Returns:
- never null
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
setBusinessCalendar
void setBusinessCalendar(IBusinessCalendar calendar)
Defines theIBusinessCalendar
for thisIApplication
. This influences theIDefaultBusinessCalendar
determination when callingivy.cal
.- Parameters:
calendar
- may be null.- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
createExternalDatabaseConfiguration
@Deprecated default IExternalDatabaseDefaultConfiguration createExternalDatabaseConfiguration(String userFriendlyName, DatabaseConnectionConfiguration connectionConfiguration, EnumSet<ExternalDatabaseConfigurationAccessFlag> accessFlags, int maxConnections)
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
current
static IApplication current()
Gets the current application.
Will return null if called out of scope. The scope is set if you call this method from an ivy process or any supported ivy environment. It is not set in non supported ivy environments (e.g. if you start your own threads, etc.).
- Returns:
- current application or null if out of scope
- Since:
- 8.0.26
- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
-