Package de.xima.fc.inbox.utils
Class InboxUtils
- java.lang.Object
-
- de.xima.fc.inbox.utils.InboxUtils
-
public class InboxUtils extends Object
- Author:
- XIMA MEDIA GmbH
-
-
Constructor Summary
Constructors Constructor Description InboxUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static booleancanChangeFormRecordToState(UserContext uc, Vorgang formRecord, Status state)Deprecated.static booleancanUserChangeToState(UserContext uc, IUser user, Status state)Deprecated.static booleancanUserEditProcess(Benutzer user, long processId)Deprecated.UseUserMgmtUtils.canAccessInbox(IUser, Postfach)instead.static intgetFormRecordCount(Postfach inbox, boolean onlyUnread)static intgetFormRecordCount(Postfach inbox, Projekt project, boolean onlyUnread)Gets the number of form records in the given inboxstatic intgetFormRecordCount(Long inboxId, boolean onlyUnread)Gets the number of form records for the given inbox idstatic StringgetFormRecordStateDisplayName(boolean newWorkflow, boolean saved, WorkflowState wfState, Status status, String verifyUuid, Date verifyDate, Locale locale)static <T extends de.xima.cmn.dao.interfaces.IEntity<I>,I extends Serializable & Comparable<I>>
List<I>getIds(List<T> entities)Turns a list of entities into a list of IDsstatic List<Long>getIdsFromExtendedModel(List<ExtendedEntityModel<Vorgang>> extEntities)static List<Projekt>getInboxProjects(UserContext uc, List<Projekt> projects, Postfach inbox)static StringgetStateDisplayName(Vorgang formRecord, Locale locale)static List<Long>getStatusIdsByName(UserContext uc, String searchStr, Mandant client)static Set<Postfach>getUserInboxes(IUser user, Mandant client)static UserProfilegetUserProfile(UUID userProfileUuid, Set<UserProfile> profileCache)Returns theUserProfilefor the givenUUIDfrom the given cache.static List<Long>getWorkflowStateIdsByName(UserContext uc, String searchStr, Mandant client)static StringtoReadableByteSize(long bytes, Locale locale)Converts the given byte size to a human-readable format.
-
-
-
Method Detail
-
canChangeFormRecordToState
@Deprecated public static boolean canChangeFormRecordToState(UserContext uc, Vorgang formRecord, Status state)
Deprecated.
-
canUserChangeToState
@Deprecated public static boolean canUserChangeToState(UserContext uc, IUser user, Status state)
Deprecated.
-
canUserEditProcess
@Deprecated public static boolean canUserEditProcess(Benutzer user, long processId)
Deprecated.UseUserMgmtUtils.canAccessInbox(IUser, Postfach)instead.
-
getFormRecordCount
public static final int getFormRecordCount(Long inboxId, boolean onlyUnread)
Gets the number of form records for the given inbox id
-
getFormRecordCount
public static final int getFormRecordCount(Postfach inbox, boolean onlyUnread)
-
getFormRecordCount
public static final int getFormRecordCount(Postfach inbox, Projekt project, boolean onlyUnread)
Gets the number of form records in the given inbox
-
getFormRecordStateDisplayName
public static final String getFormRecordStateDisplayName(boolean newWorkflow, boolean saved, WorkflowState wfState, Status status, String verifyUuid, Date verifyDate, Locale locale)
-
getIds
public static final <T extends de.xima.cmn.dao.interfaces.IEntity<I>,I extends Serializable & Comparable<I>> List<I> getIds(List<T> entities)
Turns a list of entities into a list of IDs
-
getIdsFromExtendedModel
public static final List<Long> getIdsFromExtendedModel(List<ExtendedEntityModel<Vorgang>> extEntities)
-
getInboxProjects
public static final List<Projekt> getInboxProjects(UserContext uc, List<Projekt> projects, Postfach inbox)
-
getStateDisplayName
public static final String getStateDisplayName(Vorgang formRecord, Locale locale)
-
getStatusIdsByName
public static List<Long> getStatusIdsByName(UserContext uc, String searchStr, Mandant client)
-
getUserProfile
public static UserProfile getUserProfile(UUID userProfileUuid, Set<UserProfile> profileCache)
Returns theUserProfilefor the givenUUIDfrom the given cache. If the cache is given and the user profile is not in the cache, the user profile is fetched from the database and added to the cache.- Parameters:
userProfileUuid-UUIDof the user profileprofileCache-HashSetofUserProfileto cache the user profiles- Returns:
UserProfilefor the givenUUIDornullif there is no user profile for the givenUUID.
-
getWorkflowStateIdsByName
public static List<Long> getWorkflowStateIdsByName(UserContext uc, String searchStr, Mandant client)
-
-