Example #1
0
 public void setUp() throws Exception {
   super.setUp();
   taxonomyService = (TaxonomyService) container.getComponentInstanceOfType(TaxonomyService.class);
   mockTaxonomyService =
       (MockTaxonomyService) container.getComponentInstanceOfType(MockTaxonomyService.class);
   dmsSesssion =
       sessionProviderService_.getSystemSessionProvider(null).getSession(DMSSYSTEM_WS, repository);
   nodeHierarchyCreator =
       (NodeHierarchyCreator) container.getComponentInstanceOfType(NodeHierarchyCreator.class);
   linkManage = (LinkManager) container.getComponentInstanceOfType(LinkManager.class);
   definitionPath = nodeHierarchyCreator.getJcrPath(BasePath.TAXONOMIES_TREE_DEFINITION_PATH);
   storagePath = nodeHierarchyCreator.getJcrPath(BasePath.TAXONOMIES_TREE_STORAGE_PATH);
 }
Example #2
0
  public void setUp() throws Exception {
    super.setUp();
    ExoContainer myContainer = ExoContainerContext.getCurrentContainer();
    favoriteService =
        (FavoriteService) myContainer.getComponentInstanceOfType(FavoriteService.class);

    SessionProviderService sessionProviderService =
        (SessionProviderService)
            myContainer.getComponentInstanceOfType(SessionProviderService.class);

    SessionProvider sessionProvider = sessionProviderService.getSystemSessionProvider(null);

    ManageableRepository manageableRepository = repositoryService.getRepository("repository");

    Session session = sessionProvider.getSession(COLLABORATION_WS, manageableRepository);
    Node rootNode = session.getRootNode();
    String[] names = new String[] {"root", "demo", "james", "john", "marry"};
    for (String name : names)
      if (rootNode.hasNode(name)) {
        rootNode.getNode(name).remove();
        rootNode.save();
      }
  }
Example #3
0
 public void setUp() throws Exception {
   super.setUp();
   rssService = (RSSService) container.getComponentInstanceOfType(RSSService.class);
 }