Package org.apache.wicket.serialize

Examples of org.apache.wicket.serialize.ISerializer.deserialize()


      else
      {
        serializer = new JavaSerializer(WicketObjects.class.getName());
      }
      byte[] serialized = serializer.serialize(object);
      Object deserialized = serializer.deserialize(serialized);
      return (T) deserialized;
    }
  }

  /**
 
View Full Code Here


      int pageId = pageWindow.getPageId();
      DefaultMutableTreeNode pageIdNode = new DefaultMutableTreeNode(pageId);
      root.add(pageIdNode);

      byte[] data = dataStore.getData(sessionId, pageId);
      Object page = serializer.deserialize(data);
      DefaultMutableTreeNode pageNameNode = new DefaultMutableTreeNode(page.getClass()
        .getName());
      pageIdNode.add(pageNameNode);

      DefaultMutableTreeNode pageSizeNode = new DefaultMutableTreeNode("Size: " +
View Full Code Here

        .getPageManagerProvider();
      DebugDiskDataStore dataStore = pageManagerProvider.getDataStore();
      String sessionId = windowDescription.getSessionId();
      byte[] data = dataStore.getData(sessionId, pageId);
      ISerializer serializer = Application.get().getFrameworkSettings().getSerializer();
      Object page = serializer.deserialize(data);
      label = page.getClass().getName();
    }
    else if ("id".equals(getPropertyExpression()))
    {
      label = Integer.toString(windowDescription.getId());
View Full Code Here

        .getPageManagerProvider();
      DebugDiskDataStore dataStore = pageManagerProvider.getDataStore();
      String sessionId = windowDescription.getSessionId();
      byte[] data = dataStore.getData(sessionId, pageId);
      ISerializer serializer = Application.get().getFrameworkSettings().getSerializer();
      Object page = serializer.deserialize(data);
      label = page.getClass().getName();
    }
    else if ("id".equals(getPropertyExpression()))
    {
      label = Integer.toString(windowDescription.getId());
View Full Code Here

      int pageId = pageWindow.getPageId();
      DefaultMutableTreeNode pageIdNode = new DefaultMutableTreeNode(pageId);
      root.add(pageIdNode);

      byte[] data = dataStore.getData(sessionId, pageId);
      Object page = serializer.deserialize(data);
      DefaultMutableTreeNode pageNameNode = new DefaultMutableTreeNode(page.getClass()
        .getName());
      pageIdNode.add(pageNameNode);

      DefaultMutableTreeNode pageSizeNode = new DefaultMutableTreeNode("Size: " +
View Full Code Here

    Assert.assertNotNull("The produced data should not be null!", data);

    // data length can fluctuate based on the object field values
    Assert.assertEquals("The produced data length is not correct!", 622, data.length);

    Object object = pageSerializer.deserialize(data);
    Assert.assertTrue(
      "The deserialized page must be of type HomePage. Type: " + object.getClass(),
      object instanceof HomePage);

  }
View Full Code Here

    Assert.assertNotNull("The produced data should not be null!", data);

    // data length can fluctuate based on the object field values
    Assert.assertEquals("The produced data length is not correct!", 638, data.length);

    Object object = pageSerializer.deserialize(data);
    Assert.assertTrue(
        "The deserialized page must be of type HomePage. Type: " + object.getClass(),
        object instanceof HomePage);

  }
View Full Code Here

    ISerializer pageSerializer = getAndCheckSerializer();

    byte[] data = pageSerializer.serialize(page);
    Assert.assertNotNull("The produced data should not be null!", data);

    Object object = pageSerializer.deserialize(data);
    Assert.assertTrue(
      "The deserialized page must be of type HomePage. Type: " + object.getClass(),
      object instanceof SamplePage);

    SamplePage samplePage = (SamplePage)object;
View Full Code Here

    ISerializer pageSerializer = getAndCheckSerializer();

    byte[] data = pageSerializer.serialize(page);
    Assert.assertNotNull("The produced data should not be null!", data);

    Object object = pageSerializer.deserialize(data);
    Assert.assertTrue(
        "The deserialized page must be of type HomePage. Type: " + object.getClass(),
        object instanceof SamplePage);

    SamplePage samplePage = (SamplePage)object;
View Full Code Here

    Assert.assertNotNull("The produced data should not be null!", data);

    // data length can fluctuate based on the object field values
    Assert.assertEquals("The produced data length is not correct!", 651, data.length);

    Object object = pageSerializer.deserialize(data);
    Assert.assertTrue(
        "The deserialized page must be of type HomePage. Type: " + object.getClass(),
        object instanceof HomePage);

  }
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.