/** * Go to detail page * * @return forward to DETAIL page */ public String detail() { Integer id = Integer.parseInt(FacesUtils.getRequestParameter(ROW_ID)); tag = manager.getEntityById(id); return SpringUtils.isAclPermissionGranted(tag, BasePermission.WRITE) ? NavigationResults.EDIT : NavigationResults.DETAIL; }
/** * Get default InteractionTypeManager as defined in Spring's configuration file. * * @return the default singleton InteractionTypeManager */ public static InteractionTypeManager getDefault() { return (InteractionTypeManager) SpringUtils.getSpringBean("managerInteractionType"); }
/** * Get default AccountEntryGroupManager as defined in Spring's configuration file. * * @return the default singleton AccountEntryGroupManager */ public static AccountEntryGroupManager getDefault() { return (AccountEntryGroupManager) SpringUtils.getSpringBean("managerAccountEntryGroup"); }
/** * Whether or not delete button is available for user * * @return true if user can delete current object */ public boolean isDeleteAvailable() { return (tag.getId() != null) && SpringUtils.isAclPermissionGranted(tag, BasePermission.DELETE); }
/** * Whether or not edit button is available for user * * @return true if user can edit current object */ public boolean isEditAvailable() { return SpringUtils.isAclPermissionGranted(tag, BasePermission.WRITE); }
/** * Whether or not create button is available for user * * @return true if user can create objects of type Tag */ public boolean isCreateAvailable() { return SpringUtils.isRolePermissionGranted(Permission.Entity_Create(Tag.class)); }
/** * Get default TagManager as defined in Spring's configuration file. * * @return the default singleton TagManager */ public static TagManager getDefault() { return (TagManager) SpringUtils.getSpringBean("managerTag"); }
/** @deprecated the preferred way to get the default manager is using Spring injection */ public static AuthenticationManager getDefault() { return (AuthenticationManager) SpringUtils.getSpringBean("userDetailsService"); }
/** * Get default ProjectRoleDAO as defined in Spring's configuration file. * * @return the default singleton ProjectRoleDAO */ public static ProjectRoleDAO getDefault() { return (ProjectRoleDAO) SpringUtils.getSpringBean("daoProjectRole"); }