public final class ApplicationManager extends java.lang.Object implements JPropertiesListener
Modifier and Type | Class and Description |
---|---|
class |
ApplicationManager.InstalledApplications
A POJO class representing installed applications with utility methods
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACL_CAN_USE_APPLICATION_LAUNCHER |
static java.lang.String |
INSTALL_RECOMPUTE_ALARM |
static java.lang.String |
INSTALL_RECOMPUTE_DEFAULT_SCHEDULE |
static java.lang.String |
INSTALL_RECOMPUTE_SCHEDULE_PROP |
static java.lang.String |
MBR_PREF |
static java.lang.String |
SHORTCUT_TYPE_CATEGORY_VID |
REVISION
Modifier and Type | Method and Description |
---|---|
boolean |
addApplication(Member mbr,
int tabIndex,
java.lang.String shortcutId)
Adds an application (shortcutId) in given tab for given member
|
boolean |
canRecomputeInstallCountCache(Member mbr) |
boolean |
canUseApplicationLauncher(Member mbr)
Returns true if the given member can use the Application launcher.
|
ApplicationManager.InstalledApplications |
getAlreadyInstalledTabsMap(Member mbr) |
ApplicationLauncher |
getApplicationLauncher(Member mbr)
Returns the application launcher for given member by searching for his saved launcher, or by searching
in its department default launcher, or the global default launcher
|
java.lang.String |
getApplicationLauncherAsJson(ApplicationLauncher launcher)
Transforms an application launcher into json
|
java.lang.String |
getApplicationLauncherAsJson(Member mbr) |
int |
getAverageInstallCount() |
ApplicationLauncher |
getDefaultApplicationLauncher() |
ApplicationLauncher |
getDefaultApplicationLauncher(Group department) |
java.lang.String |
getDefaultApplicationLauncherAsJson() |
Group |
getDefaultApplicationLauncherGroup(Group department) |
java.util.Set<java.lang.String> |
getDepartmentShortcutIds(Group department) |
ApplicationLauncher |
getEmptyApplicationLauncher() |
int |
getInstallCount(Application application) |
java.util.List<Application> |
getInstalledApplications(Member mbr) |
int |
getInstallOrganizationGroupCount(Application application,
Member mbr) |
static ApplicationManager |
getInstance() |
java.util.List<ApplicationLauncherTab> |
getTabs(Member mbr) |
int |
getTotalInstallCount() |
Category |
getTypeRoot() |
boolean |
hasDefaultApplicationLauncher(Group department)
Returns true if given department has a default launcher
|
boolean |
isApplicationAlreadyInTab(Member mbr,
int tabIndex,
java.lang.String shortcutId)
Checks if application is already installed in given tab index
|
boolean |
isApplicationInstalled(AbstractShortcut shortcut,
Member mbr) |
boolean |
isInstallCountInitialized() |
void |
propertiesChange(JProperties properties)
Invoked after properties have been modified in JCMS and save on disk.
|
void |
recomputeInstallCountCache()
Recomputes the install count cache asynchronously
|
boolean |
removeApplication(Member mbr,
int tabIndex,
java.lang.String shortcutId)
Removes an application (shortcutId) in given tab for given member
|
void |
resetACL()
Resets the ACL init state
|
void |
resetApplicationLauncher(java.util.Collection<Member> members,
java.util.Collection<Group> groups)
Deletes saved launcher for given member and groups
|
void |
resetDefaultApplicationLauncher(Group department) |
boolean |
saveDefaultApplicationLauncher(Group department,
java.lang.String data)
Saves json data as default json launcher for the given department
|
public static final java.lang.String SHORTCUT_TYPE_CATEGORY_VID
public static final java.lang.String MBR_PREF
public static final java.lang.String INSTALL_RECOMPUTE_SCHEDULE_PROP
public static final java.lang.String INSTALL_RECOMPUTE_DEFAULT_SCHEDULE
public static final java.lang.String INSTALL_RECOMPUTE_ALARM
public static final java.lang.String ACL_CAN_USE_APPLICATION_LAUNCHER
public static ApplicationManager getInstance()
public void propertiesChange(JProperties properties)
JPropertiesListener
You cannot alter the value received in parameters.
propertiesChange
in interface JPropertiesListener
properties
- the properties which have been modified (may not contain all JCMS properties)public boolean canUseApplicationLauncher(Member mbr)
mbr
- the memberpublic boolean isApplicationInstalled(AbstractShortcut shortcut, Member mbr)
shortcut
- the AbstractShortcut
mbr
- the Member
public void resetACL()
public boolean canRecomputeInstallCountCache(Member mbr)
mbr
- the Member
public Category getTypeRoot()
public void recomputeInstallCountCache()
public boolean isInstallCountInitialized()
public int getAverageInstallCount()
public int getInstallCount(Application application)
application
- the Application
public int getTotalInstallCount()
public java.util.Set<java.lang.String> getDepartmentShortcutIds(Group department)
department
- the organization departmentAbstractShortcut
of given departmentpublic int getInstallOrganizationGroupCount(Application application, Member mbr)
application
- the Application
mbr
- the Member
public ApplicationLauncher getDefaultApplicationLauncher()
ApplicationLauncher
public boolean saveDefaultApplicationLauncher(Group department, java.lang.String data)
department
- the Group
representing a departmentdata
- the json datapublic ApplicationLauncher getDefaultApplicationLauncher(Group department)
department
- the Group
representing departmentApplicationLauncher
for given departmentpublic Group getDefaultApplicationLauncherGroup(Group department)
public boolean hasDefaultApplicationLauncher(Group department)
department
- the Group
public java.lang.String getDefaultApplicationLauncherAsJson()
public ApplicationLauncher getEmptyApplicationLauncher()
public ApplicationLauncher getApplicationLauncher(Member mbr)
mbr
- the Member
ApplicationLauncher
public java.lang.String getApplicationLauncherAsJson(ApplicationLauncher launcher)
launcher
- the ApplicationLauncher
ApplicationLauncher
public java.lang.String getApplicationLauncherAsJson(Member mbr)
mbr
- the Member
public java.util.List<ApplicationLauncherTab> getTabs(Member mbr)
mbr
- the Member
ApplicationLauncherTab
for given memberpublic boolean addApplication(Member mbr, int tabIndex, java.lang.String shortcutId)
mbr
- the Member
tabIndex
- the tab indexshortcutId
- the AbstractShortcut
idpublic boolean removeApplication(Member mbr, int tabIndex, java.lang.String shortcutId)
mbr
- the Member
tabIndex
- the tab indexshortcutId
- the AbstractShortcut
idpublic boolean isApplicationAlreadyInTab(Member mbr, int tabIndex, java.lang.String shortcutId)
mbr
- the Member
tabIndex
- the tab indexshortcutId
- the AbstractShortcut
idpublic java.util.List<Application> getInstalledApplications(Member mbr)
mbr
- the Member
ApplicationManager.InstalledApplications
for given Member
public ApplicationManager.InstalledApplications getAlreadyInstalledTabsMap(Member mbr)
public void resetApplicationLauncher(java.util.Collection<Member> members, java.util.Collection<Group> groups)
public void resetDefaultApplicationLauncher(Group department)
Copyright © 2001-2019 Jalios SA. All Rights Reserved.