Examples of ItemData


Examples of com.sun.jersey.samples.optimisticconcurrency.ItemData

    }
   
    @GET
    @Produces("application/xml")
    public Item get() {
        ItemData id = ItemData.ITEM;
        String version = null;
        MediaType mediaType = null;
        synchronized (id) {
            version = id.getVersionAsString();
            mediaType = id.getMediaType();
        }
       
        UriBuilder ub = uriInfo.getAbsolutePathBuilder().path("content");
        return new Item(
                ub.build(),
View Full Code Here

Examples of games.stendhal.server.maps.quests.StuffForBaldemar.ItemData

   * Tests for itemData.
   */
  @Test
  public void testItemData() throws Exception {
    int needed = 20;
    ItemData id = new ItemData("name", needed, "prefix ", " suffix");
    assertEquals(needed, id.getStillNeeded());
    id.setAmount(15);
    assertEquals(15, id.getStillNeeded());
    assertEquals(needed, id.getRequired());
    assertEquals("name", id.getName());
    assertEquals("prefix ", id.getPrefix());
    assertEquals(" suffix", id.getSuffix());
    id.subAmount("10");
    assertEquals(5, id.getStillNeeded());
    assertEquals(needed, id.getRequired());
    assertEquals(15, id.getAlreadyBrought());
    assertEquals("prefix 5 names suffix", id.getAnswer());
   
  }
View Full Code Here

Examples of net.citizensnpcs.npcdata.ItemData

        for (String s : current.split(",")) {
            if (!s.contains(":")) {
                s += ":0";
            }
            String[] parts = s.split(":");
            items.add(new ItemData(Integer.parseInt(parts[0]), Short.parseShort(parts[1])));
        }
        return items;
    }
View Full Code Here

Examples of org.exoplatform.services.jcr.datamodel.ItemData

    * @throws RepositoryException
    */
   public ItemData getItemData(NodeData parent, QPathEntry[] relPathEntries, ItemType itemType)
      throws RepositoryException
   {
      ItemData item = parent;
      for (int i = 0; i < relPathEntries.length; i++)
      {
         if (i == relPathEntries.length - 1)
         {
            item = getItemData(parent, relPathEntries[i], itemType);
         }
         else
         {
            item = getItemData(parent, relPathEntries[i], ItemType.UNKNOWN);
         }

         if (item == null)
         {
            break;
         }

         if (item.isNode())
         {
            parent = (NodeData)item;
         }
         else if (i < relPathEntries.length - 1)
         {
View Full Code Here

Examples of org.exoplatform.services.jcr.datamodel.ItemData

         {
            return getItemData(parent.getParentIdentifier());
         }
      }

      ItemData data = null;

      // 1. Try in transient changes
      ItemState state = changesLog.getItemState(parent, name, itemType);
      if (state == null)
      {
View Full Code Here

Examples of org.exoplatform.services.jcr.datamodel.ItemData

    * @throws RepositoryException
    * @see org.exoplatform.services.jcr.dataflow.ItemDataConsumer#getItemData(java.lang.String)
    */
   public ItemData getItemData(String identifier) throws RepositoryException
   {
      ItemData data = null;
      // 1. Try in transient changes
      ItemState state = changesLog.getItemState(identifier);
      if (state == null)
      {
         // 2. Try from txdatamanager
View Full Code Here

Examples of org.exoplatform.services.jcr.datamodel.ItemData

         if (path.equals(Constants.ROOT_PATH))
         {
            return parent.getACL();
         }

         ItemData item = null;
         QPathEntry[] relPathEntries = path.getRelPath(path.getDepth());
         for (int i = 0; i < relPathEntries.length; i++)
         {
            if (i == relPathEntries.length - 1)
            {
               item = getItemData(parent, relPathEntries[i], ItemType.NODE);
            }
            else
            {
               item = getItemData(parent, relPathEntries[i], ItemType.UNKNOWN);
            }

            if (item == null)
            {
               break;
            }

            if (item.isNode())
            {
               parent = (NodeData)item;
            }
            else if (i < relPathEntries.length - 1)
            {
               throw new IllegalPathException("Get ACL. Path can not contains a property as the intermediate element");
            }
         }

         if (item != null && item.isNode())
         {
            // node ACL
            return ((NodeData)item).getACL();
         }
         else
View Full Code Here

Examples of org.exoplatform.services.jcr.datamodel.ItemData

         log.debug("getACL(" + parent.getQPath().getAsString() + " + " + name.getAsString() + " ) >>>>>");
      }

      try
      {
         ItemData item = getItemData(parent, name, ItemType.NODE);
         if (item != null && item.isNode())
         {
            // node ACL
            return ((NodeData)item).getACL();
         }
         else
View Full Code Here

Examples of org.exoplatform.services.jcr.datamodel.ItemData

      for (ItemImpl item : pooledItems)
      {
         if (item.getInternalPath().isDescendantOf(fromItem.getQPath())
            || item.getInternalPath().equals(fromItem.getQPath()))
         {
            ItemData ri = getItemData(item.getInternalIdentifier());
            if (ri != null)
            {
               itemsPool.reload(ri);
            }
            else
View Full Code Here

Examples of org.exoplatform.services.jcr.datamodel.ItemData

         }

         NodeData parent = (NodeData)transactionableManager.getItemData(rstate.getData().getParentIdentifier());
         if (parent != null)
         {
            ItemData persisted =
               transactionableManager.getItemData(parent, rstate.getData().getQPath().getEntries()[rstate.getData()
                  .getQPath().getEntries().length - 1], ItemType.getItemType(rstate.getData()));

            if (persisted != null)
            {
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.