Examples of Space


Examples of org.apache.jetspeed.spaces.Space

   
    @Override
    public void processAction(ActionRequest actionRequest, ActionResponse actionResponse) throws PortletException, IOException
    {
        String navAction = actionRequest.getParameter("navAction");
        Space space = null;
        String spaceName = actionRequest.getParameter(SpaceNavigator.ATTRIBUTE_SPACE);
        if (spaceName != null)
        {
            space = getSpaceFromName(spaceName, actionRequest);
        }
       
        if ("addSpace".equals(navAction))
        {
            // TODO: make this link configurable. We need JetspeedLinks like in Jetspeed-1
            PortletMessaging.cancel(actionRequest, SpacesManager.MSG_TOPIC_SPACE_LIST, SpacesManager.MSG_SPACE_CHANGE);
            String spaceEditPath = actionRequest.getPreferences().getValue(SPACE_EDIT_PATH_PREF, SPACE_EDIT_PATH_DEFAULT);                          
            String path = admin.getPortalURL(actionRequest, actionResponse, spaceEditPath);
            actionResponse.sendRedirect(path);
            return;
        }
        else if ("editSpace".equals(navAction) && space != null)
        {
            if (space != null)
            {
                PortletMessaging.publish(actionRequest, SpacesManager.MSG_TOPIC_SPACE_LIST, SpacesManager.MSG_SPACE_CHANGE, spaceName);
                String spaceEditPath = actionRequest.getPreferences().getValue(SPACE_EDIT_PATH_PREF, SPACE_EDIT_PATH_DEFAULT);                          
                String path = admin.getPortalURL(actionRequest, actionResponse, spaceEditPath);
                actionResponse.sendRedirect(path);
                return;
            }
        }
        else if (space != null)
        {
            if (space != null)
            {
                String path = admin.getPortalURL(actionRequest, actionResponse, space.getPath());
                actionRequest.getPortletSession().setAttribute(SpaceNavigator.ATTRIBUTE_SPACE, new SpaceBean(space));    
                PortletMessaging.publish(actionRequest, SpacesManager.MSG_TOPIC_PAGE_NAV, SpacesManager.MSG_SPACE_CHANGE, spaceName);
                actionResponse.sendRedirect(path);
                return;
            }
View Full Code Here

Examples of org.apache.jetspeed.spaces.Space

    protected Space getSpaceFromName(String spaceName, PortletRequest request)
    {
        List<Space> spaces = spacesService.listSpaces();
        if (request.getUserPrincipal() != null)
        {
            Space home = spacesService.lookupUserSpace(request.getUserPrincipal().getName());
          if (home != null)
          {
            if (home.getName().equals(spaceName)) // FIXME: name unique
              return home;
          }
        }
        Space space = null;
        for (Space sp: spaces)
        {
            if (sp.getName().equals(spaceName))
            {
                space = sp;
View Full Code Here

Examples of org.apache.jetspeed.spaces.Space

            spaces = createSpaceBeanList(spacesService, userName, null);
           
            if (request.getUserPrincipal() != null)
            {
              String username = request.getUserPrincipal().getName();
              Space home = spacesService.lookupUserSpace(username);
             
              if (home != null)
              {
                if (home.getOwner() == null)
                {
                  try
                  {
                    home.setOwner(username);
                    spacesService.storeSpace(home);
                  }
                  catch (SpacesException e)
                  {
                    throw new PortletException(e);
                  }
                }
               
                SpaceBean userHome = new SpaceBean(home);
                userHome.setDescription(home.getDescription());
                userHome.setTitle(home.getTitle());
                userHome.setUserHomePath(home.getPath());
                userHome.setUserHomeName(home.getName());
                  spaces.add(userHome);                   
              }
            }
           
            request.getPortletSession().setAttribute(SpaceNavigator.ATTRIBUTE_SPACES, spaces, PortletSession.APPLICATION_SCOPE);       
View Full Code Here

Examples of org.apache.uima.ruta.type.SPACE

          return t;
        }
        case 19:
          break;
        case 4: {
          SPACE t = new SPACE(cas);
          t.setBegin(yychar);
          t.setEnd(yychar + yytext().length());

          return t;
        }
        case 20:
          break;
        case 11: {
          COMMA t = new COMMA(cas);
          t.setBegin(yychar);
          t.setEnd(yychar + yytext().length());

          return t;
        }
        case 21:
          break;
        case 1: {
          SPECIAL t = new SPECIAL(cas);
          t.setBegin(yychar);
          t.setEnd(yychar + yytext().length());

          return t;
        }
        case 22:
          break;
        case 15: {
          MARKUP t = new MARKUP(cas);
          t.setBegin(yychar);
          t.setEnd(yychar + yytext().length());

          return t;
        }
        case 23:
          break;
        case 6: {
          EXCLAMATION t = new EXCLAMATION(cas);
          t.setBegin(yychar);
          t.setEnd(yychar + yytext().length());

          return t;
        }
        case 24:
          break;
        case 7: {
          NBSP t = new NBSP(cas);
          t.setBegin(yychar);
          t.setEnd(yychar + yytext().length());

          return t;
        }
        case 25:
          break;
        case 14: {
          CAP t = new CAP(cas);
          t.setBegin(yychar);
          t.setEnd(yychar + yytext().length());

          return t;
        }
        case 26:
          break;
        case 12: {
          PERIOD t = new PERIOD(cas);
          t.setBegin(yychar);
          t.setEnd(yychar + yytext().length());

          return t;
        }
        case 27:
          break;
        case 5: {
          BREAK t = new BREAK(cas);
          t.setBegin(yychar);
          t.setEnd(yychar + yytext().length());

          return t;
        }
        case 28:
          break;
        case 2: {
          CW t = new CW(cas);
          t.setBegin(yychar);
          t.setEnd(yychar + yytext().length());

          return t;
        }
        case 29:
          break;
        case 10: {
          COLON t = new COLON(cas);
          t.setBegin(yychar);
          t.setEnd(yychar + yytext().length());

          return t;
        }
        case 30:
          break;
        case 9: {
          SEMICOLON t = new SEMICOLON(cas);
          t.setBegin(yychar);
          t.setEnd(yychar + yytext().length());

          return t;
        }
        case 31:
          break;
        case 16: {
          AMP t = new AMP(cas);
          t.setBegin(yychar);
          t.setEnd(yychar + yytext().length());

          return t;
        }
        case 32:
          break;
View Full Code Here

Examples of org.codehaus.swizzle.confluence.Space

    public void setUp() throws Exception
    {
        super.setUp();

        spaceKey = "SomeContainerSpace";
        Space space = new Space();
        space.setKey(spaceKey);
        space.setName("Some Name");

        try {
            rpc.addSpace(space);
        } catch (Exception e) {
            // Now we throw exception if the space already exists
View Full Code Here

Examples of org.codehaus.swizzle.confluence.Space

    }

    public void testGetSpace() throws Exception
    {
        List<SpaceSummary> spaces = rpc.getSpaces();
        Space space = rpc.getSpace(spaces.get(0).getKey());

        TestUtils.banner("TEST: getSpaceTest()");
        System.out.format("%s\n", space);

        assertEquals(space.getKey(), spaces.get(0).getKey());
    }
View Full Code Here

Examples of org.codehaus.swizzle.confluence.Space

    }

    public void testGetNonExistingSpace() throws Exception
    {
        try {
            Space space = rpc.getSpace("thisSpaceShouldNotExist");
            Assert.fail();
        } catch (XmlRpcException e) {
        }
    }
View Full Code Here

Examples of org.codehaus.swizzle.confluence.Space

        }
    }

    public void testAddSpace() throws Exception
    {
        Space space = new Space();
        space.setKey(String.format("%s-%d", TestConstants.TEST_PREFIX, Math.abs(random.nextInt())));
        space.setName("TEST Space");

        space = rpc.addSpace(space);

        TestUtils.banner("TEST: addSpace()");
        System.out.format("%s\n", space);

        List<SpaceSummary> spaces = rpc.getSpaces();
        boolean found = false;
        for (SpaceSummary spaceSummary : spaces) {
            if (spaceSummary.getKey().equals(space.getKey())) {
                found = true;
                break;
            }
        }
View Full Code Here

Examples of org.codehaus.swizzle.confluence.Space

        Assert.assertTrue(found);
    }

    public void testAddDuplicatedSpace() throws Exception
    {
        Space space = new Space();
        space.setKey(String.format("%s-%d", TestConstants.TEST_PREFIX, Math.abs(random.nextInt())));
        space.setName("TEST Space");

        try {
            space = rpc.addSpace(space);
            space = rpc.addSpace(space);
            Assert.fail();
View Full Code Here

Examples of org.codehaus.swizzle.confluence.Space

            System.out.format("User admin can always access everything\n");
            return;
        }

        try {
            Space space = rpc.getSpace(TestConstants.SPACE_WITH_NO_ACCESS_RIGHTS);
        } catch (XmlRpcException e) {
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.