Exemplo n.º 1
0
  /**
   * 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");
 }
Exemplo n.º 4
0
 /**
  * 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);
 }
Exemplo n.º 5
0
 /**
  * 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);
 }
Exemplo n.º 6
0
 /**
  * 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));
 }
Exemplo n.º 7
0
 /**
  * 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");
 }
Exemplo n.º 9
0
 /**
  * Get default ProjectRoleDAO as defined in Spring's configuration file.
  *
  * @return the default singleton ProjectRoleDAO
  */
 public static ProjectRoleDAO getDefault() {
   return (ProjectRoleDAO) SpringUtils.getSpringBean("daoProjectRole");
 }