Package org.apache.wicket.AccessStackPageMap

Examples of org.apache.wicket.AccessStackPageMap.Access


            else if (pageMap instanceof AccessStackPageMap)
            {
              AccessStackPageMap accessStackPageMap = (AccessStackPageMap)pageMap;
              if (accessStackPageMap.getAccessStack().size() > 0)
              {
                final Access access = accessStackPageMap.getAccessStack().peek();

                final int pageId = Integer.parseInt(Strings.firstPathComponent(
                  requestParameters.getComponentPath(), Component.PATH_SEPARATOR));

                if (pageId != access.getId())
                {
                  // the page is no longer the active page
                  // - ignore this request
                  processRequest = 2;
                }
                else
                {
                  final int version = requestParameters.getVersionNumber();
                  if (version != Page.LATEST_VERSION &&
                    version != access.getVersion())
                  {
                    // version is no longer the active version -
                    // ignore this request
                    processRequest = 2;
                  }
View Full Code Here


          else if (pageMap instanceof AccessStackPageMap)
          {
            AccessStackPageMap accessStackPageMap = (AccessStackPageMap)pageMap;
            if (accessStackPageMap.getAccessStack().size() > 0)
            {
              final Access access = (Access)accessStackPageMap.getAccessStack()
                .peek();

              final int pageId = Integer.parseInt(Strings.firstPathComponent(
                requestParameters.getComponentPath(), Component.PATH_SEPARATOR));

              if (pageId != access.getId())
              {
                // the page is no longer the active page
                // - ignore this request
                processRequest = 2;
              }
              else
              {
                final int version = requestParameters.getVersionNumber();
                if (version != Page.LATEST_VERSION &&
                  version != access.getVersion())
                {
                  // version is no longer the active version -
                  // ignore this request
                  processRequest = 2;
                }
View Full Code Here

          else if (pageMap instanceof AccessStackPageMap)
          {
            AccessStackPageMap accessStackPageMap = (AccessStackPageMap)pageMap;
            if (accessStackPageMap.getAccessStack().size() > 0)
            {
              final Access access = (Access)accessStackPageMap.getAccessStack()
                  .peek();

              final int pageId = Integer
                  .parseInt(Strings.firstPathComponent(requestParameters
                      .getComponentPath(), Component.PATH_SEPARATOR));

              if (pageId != access.getId())
              {
                // the page is no longer the active page
                // - ignore this request
                processRequest = false;
              }
              else
              {
                final int version = requestParameters.getVersionNumber();
                if (version != Page.LATEST_VERSION &&
                    version != access.getVersion())
                {
                  // version is no longer the active version -
                  // ignore this request
                  processRequest = false;
                }
View Full Code Here

          else if (pageMap instanceof AccessStackPageMap)
          {
            AccessStackPageMap accessStackPageMap = (AccessStackPageMap)pageMap;
            if (accessStackPageMap.getAccessStack().size() > 0)
            {
              final Access access = accessStackPageMap.getAccessStack().peek();

              final int pageId = Integer.parseInt(Strings.firstPathComponent(
                requestParameters.getComponentPath(), Component.PATH_SEPARATOR));

              if (pageId != access.getId())
              {
                // the page is no longer the active page
                // - ignore this request
                processRequest = 2;
              }
              else
              {
                final int version = requestParameters.getVersionNumber();
                if (version != Page.LATEST_VERSION &&
                  version != access.getVersion())
                {
                  // version is no longer the active version -
                  // ignore this request
                  processRequest = 2;
                }
View Full Code Here

          else if (pageMap instanceof AccessStackPageMap)
          {
            AccessStackPageMap accessStackPageMap = (AccessStackPageMap)pageMap;
            if (accessStackPageMap.getAccessStack().size() > 0)
            {
              final Access access = (Access)accessStackPageMap.getAccessStack()
                .peek();

              final int pageId = Integer.parseInt(Strings.firstPathComponent(
                requestParameters.getComponentPath(), Component.PATH_SEPARATOR));

              if (pageId != access.getId())
              {
                // the page is no longer the active page
                // - ignore this request
                processRequest = false;
              }
              else
              {
                final int version = requestParameters.getVersionNumber();
                if (version != Page.LATEST_VERSION &&
                  version != access.getVersion())
                {
                  // version is no longer the active version -
                  // ignore this request
                  processRequest = false;
                }
View Full Code Here

          else if (pageMap instanceof AccessStackPageMap)
          {
            AccessStackPageMap accessStackPageMap = (AccessStackPageMap)pageMap;
            if (accessStackPageMap.getAccessStack().size() > 0)
            {
              final Access access = (Access)accessStackPageMap.getAccessStack()
                  .peek();

              final int pageId = Integer
                  .parseInt(Strings.firstPathComponent(requestParameters
                      .getComponentPath(), Component.PATH_SEPARATOR));

              if (pageId != access.getId())
              {
                // the page is no longer the active page
                // - ignore this request
                processRequest = false;
              }
              else
              {
                final int version = requestParameters.getVersionNumber();
                if (version != Page.LATEST_VERSION
                    && version != access.getVersion())
                {
                  // version is no longer the active version -
                  // ignore this request
                  processRequest = false;
                }
View Full Code Here

       * Populate the table with Wicket elements
       */
      @Override
      protected void populateItem(final ListItem<Access> listItem)
      {
        final Access access = listItem.getModelObject();
        IPageMapEntry entry = pageMap.getEntry(access.getId());
        PageParameters parameters = new PageParameters();
        parameters.put("pageId", "" + entry.getNumericId());
        Link link = new BookmarkablePageLink("link", InspectorPage.class, parameters);
        link.add(new Label("id", "" + entry.getNumericId()));
        listItem.add(link);
        listItem.add(new Label("class", "" + entry.getClass().getName()));
        long size;
        int versions;
        if (entry instanceof Page)
        {
          Page page = (Page)entry;
          page.detachModels();
          size = page.getSizeInBytes();
          versions = page.getVersions();
        }
        else
        {
          size = Objects.sizeof(entry);
          versions = 0;
        }
        listItem.add(new Label("access", "" + (accessStack.size() - listItem.getIndex())));
        listItem.add(new Label("version", "" + access.getVersion()));
        listItem.add(new Label("versions", "" + versions));
        listItem.add(new Label("size", size == -1 ? "[Unknown]" : "" + Bytes.bytes(size)));
      }
    });
  }
View Full Code Here

          else if (pageMap instanceof AccessStackPageMap)
          {
            AccessStackPageMap accessStackPageMap = (AccessStackPageMap)pageMap;
            if (accessStackPageMap.getAccessStack().size() > 0)
            {
              final Access access = accessStackPageMap.getAccessStack().peek();

              final int pageId = Integer.parseInt(Strings.firstPathComponent(
                requestParameters.getComponentPath(), Component.PATH_SEPARATOR));

              if (pageId != access.getId())
              {
                // the page is no longer the active page
                // - ignore this request
                processRequest = false;
              }
              else
              {
                final int version = requestParameters.getVersionNumber();
                if (version != Page.LATEST_VERSION &&
                  version != access.getVersion())
                {
                  // version is no longer the active version -
                  // ignore this request
                  processRequest = false;
                }
View Full Code Here

       * Populate the table with Wicket elements
       */
      @Override
      protected void populateItem(final ListItem<Access> listItem)
      {
        final Access access = listItem.getModelObject();
        IPageMapEntry entry = pageMap.getEntry(access.getId());
        PageParameters parameters = new PageParameters();
        parameters.put("pageId", "" + entry.getNumericId());
        parameters.put("pageMap", pageMap.getName() == null ? "" : pageMap.getName());
        Link<?> link = new BookmarkablePageLink<Void>("link", InspectorPage.class, parameters);
        link.add(new Label("id", "" + entry.getNumericId()));
        listItem.add(link);
        listItem.add(new Label("class", "" + entry.getClass().getName()));
        long size;
        int versions;
        if (entry instanceof Page)
        {
          Page page = (Page)entry;
          page.detachModels();
          size = page.getSizeInBytes();
          versions = page.getVersions();
        }
        else
        {
          size = Objects.sizeof(entry);
          versions = 0;
        }
        listItem.add(new Label("access", "" + (accessStack.size() - listItem.getIndex())));
        listItem.add(new Label("version", "" + access.getVersion()));
        listItem.add(new Label("versions", "" + versions));
        listItem.add(new Label("size", size == -1 ? "[Unknown]" : "" + Bytes.bytes(size)));
      }
    });
  }
View Full Code Here

            else if (pageMap instanceof AccessStackPageMap)
            {
              AccessStackPageMap accessStackPageMap = (AccessStackPageMap)pageMap;
              if (accessStackPageMap.getAccessStack().size() > 0)
              {
                final Access access = accessStackPageMap.getAccessStack().peek();

                final int pageId = Integer.parseInt(Strings.firstPathComponent(
                  requestParameters.getComponentPath(), Component.PATH_SEPARATOR));

                if (pageId != access.getId())
                {
                  // the page is no longer the active page
                  // - ignore this request
                  processRequest = 2;
                }
                else
                {
                  final int version = requestParameters.getVersionNumber();
                  if (version != Page.LATEST_VERSION &&
                    version != access.getVersion())
                  {
                    // version is no longer the active version -
                    // ignore this request
                    processRequest = 2;
                  }
View Full Code Here

TOP

Related Classes of org.apache.wicket.AccessStackPageMap.Access

Copyright © 2018 www.massapicom. 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.