Esempio n. 1
0
 public MenuItemEntity createPageMenuItem(
     String name,
     Integer order,
     String menuName,
     String displayName,
     String site,
     String owner,
     String modifier,
     boolean hasSection,
     Boolean isOrderedSection,
     String language,
     String parentName,
     Integer parentOrder,
     Date timestamp,
     boolean isHidden,
     Document xmlData) {
   MenuItemEntity menuItem = new MenuItemEntity();
   menuItem.setKey(new MenuItemKey(mockKeyService.generateNextKeySafe("TMENUITEM")));
   menuItem.setName(name);
   menuItem.setOrder(order);
   menuItem.setMenuName(menuName);
   menuItem.setDisplayName(displayName);
   menuItem.setSite(fixture.findSiteByName(site));
   menuItem.setOwner(fixture.findUserByName(owner));
   menuItem.setModifier(fixture.findUserByName(modifier));
   menuItem.setType(MenuItemType.PAGE);
   menuItem.setSection(hasSection);
   menuItem.setOrderedSection(isOrderedSection);
   menuItem.setLanguage(fixture.findLanguageByCode(language));
   if (parentName != null) {
     menuItem.setParent(fixture.findMenuItemByName(parentName));
   }
   menuItem.setTimestamp(timestamp == null ? new Date() : timestamp);
   menuItem.setHidden(isHidden);
   menuItem.setXmlData(xmlData);
   return menuItem;
 }
Esempio n. 2
0
  public MenuItemAccessEntity createMenuItemAccess(
      String menuItemName, int menuItemOrder, GroupEntity group, String accesses) {
    MenuItemEntity menuItem = fixture.findMenuItemByName(menuItemName);

    return createMenuItemAccess(menuItem, group, accesses);
  }