コード例 #1
0
  @Override
  protected long updateEntry(long baseModelId) throws Exception {
    BookmarksEntry entry = BookmarksEntryLocalServiceUtil.getEntry(baseModelId);

    entry = BookmarksTestUtil.updateEntry(entry);

    return entry.getEntryId();
  }
コード例 #2
0
  @Override
  protected long addBaseModel(long containerModelId) throws Exception {
    ServiceContext serviceContext = ServiceTestUtil.getServiceContext(group.getGroupId());

    BookmarksEntry entry = BookmarksTestUtil.addEntry(containerModelId, true, serviceContext);

    return entry.getEntryId();
  }
コード例 #3
0
  @Override
  protected BaseModel<?> getParentBaseModel(Group group, ServiceContext serviceContext)
      throws Exception {

    return BookmarksTestUtil.addFolder(
        group.getGroupId(),
        BookmarksFolderConstants.DEFAULT_PARENT_FOLDER_ID,
        ServiceTestUtil.randomString());
  }
コード例 #4
0
  @Override
  protected long addContainerModel(long containerModelId) throws Exception {
    ServiceContext serviceContext = ServiceTestUtil.getServiceContext(group.getGroupId());

    BookmarksFolder folder =
        BookmarksTestUtil.addFolder(
            containerModelId, ServiceTestUtil.randomString(), serviceContext);

    return folder.getFolderId();
  }
コード例 #5
0
  @Override
  protected BaseModel<?> addBaseModelWithWorkflow(
      BaseModel<?> parentBaseModel,
      boolean approved,
      String keywords,
      ServiceContext serviceContext)
      throws Exception {

    BookmarksFolder parentFolder = (BookmarksFolder) parentBaseModel;

    return BookmarksTestUtil.addFolder(
        parentFolder.getGroupId(), parentFolder.getFolderId(), keywords);
  }