Examples of Page


Examples of org.gatein.api.page.Page

        public boolean accept(Node element) {
            if (element.getPageId() == null) {
                return true;
            }

            Page page = portal.getPage(element.getPageId());
            Permission permission = access ? page.getAccessPermission() : page.getEditPermission();
            return portal.hasPermission(user, permission);
        }
View Full Code Here

Examples of org.gatein.mop.api.workspace.Page

      assertEquals("en", attrs.getString("locale"));
      assertEquals("test_skin", attrs.getString("skin"));
      assertEquals("test_prop_value", attrs.getString("prop_key"));

      //
      Page layout = portal.getRootNavigation().getTemplatized().getTemplate();
      assertNotNull(layout);
      assertSame(portal.getRootPage().getChild("templates").getChild("default"), layout);
   }
View Full Code Here

Examples of org.h2.store.Page

     *
     * @param id the page id
     * @return the page
     */
    PageDataOverflow getPageOverflow(int id) {
        Page p = store.getPage(id);
        if (p instanceof PageDataOverflow) {
            return (PageDataOverflow) p;
        }
        throw DbException.get(ErrorCode.FILE_CORRUPTED_1, p == null ? "null" : p.toString());
    }
View Full Code Here

Examples of org.hdiv.state.Page

  /**
   * DataComposer initialization with new stack to store all states of the page <code>page</code>.
   */
  public void init() {
    this.setPage(new Page());
    this.statesStack = new Stack<IState>();
  }
View Full Code Here

Examples of org.hightides.annotations.Page

    }   
    params.put(fieldsPrefix +  "fields", fieldParams);
    params.put("titleField", AnnotationUtil.getTitleField(clazz));
    Annotation annotation = clazz.getAnnotation(Page.class);
    if (annotation instanceof Page) {
      Page page = (Page) annotation;
      params.put("syncMode", page.synchronizeMode());
      params.put("pageType", page.pageType());
    } else {
      // unexpected case... but handle it nevertheless
      params.put("syncMode", SyncMode.UPDATE);
      _log.error("Unable to retrieve syncMode for ["+clazz.getName()+"]");
    }
View Full Code Here

Examples of org.hornetq.core.paging.Page

         fileFactory = storeFactory.newFileFactory(getStoreName());
      }

      SequentialFile file = fileFactory.createSequentialFile(fileName, 1000);

      Page page = new PageImpl(storeName, storageManager, fileFactory, file, pageNumber);

      // To create the file
      file.open();

      file.position(0);
View Full Code Here

Examples of org.hornetq.core.paging.impl.Page

         // Reading is done outside of the synchronized block, however
         // the page stays locked until the entire reading is finished
         if (needToRead)
         {
            Page page = null;
            try
            {
               page = pagingStore.createPage((int)pageId);

               storageManager.beforePageRead();
               page.open();

               List<PagedMessage> pgdMessages = page.read(storageManager);
               cache.setMessages(pgdMessages.toArray(new PagedMessage[pgdMessages.size()]));
            }
            finally
            {
               try
               {
                  if (page != null)
                  {
                     page.close();
                  }
               }
               catch (Throwable ignored)
               {
               }
View Full Code Here

Examples of org.htmlparser.lexer.Page

      }
    }

    // Using HTMLParser to extract the content
    String cleanedContent = null;
    Page htmlPage = new Page(cuttedContent, "UTF-8");
    Parser parser = new Parser(new Lexer(htmlPage));
    StringBean stringBean = new StringBean();

    // replace multiple whitespace with one whitespace
    stringBean.setCollapse(true);
    // Do not extract URLs
    stringBean.setLinks(false);
    // replace &nbsp; with whitespace
    stringBean.setReplaceNonBreakingSpaces(true);

    try {
      // Parse the content
      parser.visitAllNodesWith(stringBean);
      cleanedContent = stringBean.getStrings();

    } catch (ParserException ex) {
      throw new RegainException("Error while parsing content: ", ex);
    }

    // The result of parsing the html-content
    setCleanedContent(cleanedContent);

    // Extract links
    LinkVisitor linkVisitor = new LinkVisitor();
    if (isContentCutted) {
      // This means a new parser run which is expensive but neccessary
      htmlPage = new Page(rawDocument.getContentAsString(), "UTF-8");
      parser = new Parser(new Lexer(htmlPage));
    } else {
      parser.reset();
    }

    try {
      // Parse the content
      parser.visitAllNodesWith(linkVisitor);
      ArrayList<Tag> links = linkVisitor.getLinks();
      htmlPage.setBaseUrl(rawDocument.getUrl());

      // Iterate over all links found
      Iterator linksIter = links.iterator();
      while (linksIter.hasNext()) {
        LinkTag currTag = ((LinkTag) linksIter.next());
View Full Code Here

Examples of org.icepdf.core.pobjects.Page

  private static BufferedImage toBufferedImage(Document document, int pageNumber,float scale,boolean transparent) {
    System.getProperties().put("org.icepdf.core.screen.background", "VALUE_DRAW_NO_BACKGROUND");
   
    Catalog cat = document.getCatalog();
    Page page = cat.getPageTree().getPage(pageNumber-1, document);
        PDimension sz = page.getSize(Page.BOUNDARY_CROPBOX, 0f, scale);

        int pageWidth = (int) sz.getWidth();
        int pageHeight = (int) sz.getHeight();

        BufferedImage image = new BufferedImage(pageWidth,
                pageHeight,
                transparent?BufferedImage.TYPE_INT_ARGB:BufferedImage.TYPE_INT_RGB);
        Graphics g = image.createGraphics();
        if (!transparent) {
          PRectangle pageBoundary = page.getPageBoundary(Page.BOUNDARY_CROPBOX);
          float x = 0 - pageBoundary.x;
            float y = 0 - (pageBoundary.y - pageBoundary.height);

            g.setColor(Color.WHITE);
            g.fillRect((int) (0 - x),
                    (int) (0 - y),
                    (int) pageBoundary.width,
                    (int) pageBoundary.height);
        }
       
        page.paint(g, GraphicsRenderingHints.SCREEN,
            Page.BOUNDARY_CROPBOX, 0f, scale);
       
       
       
        g.dispose();
View Full Code Here

Examples of org.javalite.activejdbc.test_models.Page

* @author igor on 7/6/14.
*/
public class CustomConverterTest extends ActiveJDBCTest {
    @Test
    public void shouldConvertStringToNumber(){
        Page p = new Page();
        p.set("word_count", "123");
        a(p.get("word_count") instanceof Integer).shouldBeFalse();
        p.validate();
        a(p.get("word_count") instanceof Integer).shouldBeTrue();
    }
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.