Examples of PropertyImpl


Examples of org.exoplatform.services.jcr.impl.core.PropertyImpl

   private static Log log = ExoLogger.getLogger("exo.jcr.component.ext.AddMetadataAction");

   public boolean execute(Context ctx) throws Exception
   {

      PropertyImpl property = (PropertyImpl)ctx.get("currentItem");
      NodeImpl parent = property.getParent();
      if (!parent.isNodeType("nt:resource"))
      {
         throw new Exception("incoming node is not nt:resource type");
      }

      InputStream data = null;
      String mimeType;

      try
      {
         if (property.getInternalName().equals(Constants.JCR_DATA))
         {
            data = ((PropertyData)property.getData()).getValues().get(0).getAsStream();
            try
            {
               mimeType = parent.getProperty("jcr:mimeType").getString();
            }
            catch (PathNotFoundException e)
            {
               return false;
            }
         }
         else if (property.getInternalName().equals(Constants.JCR_MIMETYPE))
         {
            mimeType = property.getString();
            try
            {
               PropertyImpl propertyImpl = (PropertyImpl)parent.getProperty("jcr:data");
               data = ((PropertyData)propertyImpl.getData()).getValues().get(0).getAsStream();
            }
            catch (PathNotFoundException e)
            {
               return false;
            }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.PropertyImpl

            {
               String propertyName = resolver.createJCRName(properties[i]).getAsString();
               node = (NodeImpl)getNode();
               if (node.hasProperty(propertyName))
               {
                  PropertyImpl prop = (PropertyImpl)node.getProperty(propertyName);
                  if (!prop.getDefinition().isMultiple())
                  {
                     if (prop.getDefinition().getRequiredType() == PropertyType.UNDEFINED)
                     {
                        tmp[i] = valueFactory.createValue(prop.getString());
                     }
                     else
                     {
                        tmp[i] = prop.getValue();
                     }
                  }
                  else
                  {
                     // mvp values cannot be returned
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.PropertyImpl

   private static Log log = ExoLogger.getLogger("exo.jcr.component.ext.AddMetadataAction");

   public boolean execute(Context ctx) throws Exception
   {

      PropertyImpl property = (PropertyImpl)ctx.get("currentItem");
      NodeImpl parent = (NodeImpl)property.getParent();
      if (!parent.isNodeType("nt:resource"))
      {
         throw new Exception("incoming node is not nt:resource type");
      }

      InputStream data = null;
      String mimeType;

      try
      {
         if (property.getInternalName().equals(Constants.JCR_DATA))
         {
            data = ((PropertyData)property.getData()).getValues().get(0).getAsStream();
            try
            {
               mimeType = parent.getProperty("jcr:mimeType").getString();
            }
            catch (PathNotFoundException e)
            {
               return false;
            }
         }
         else if (property.getInternalName().equals(Constants.JCR_MIMETYPE))
         {
            mimeType = property.getString();
            try
            {
               PropertyImpl propertyImpl = (PropertyImpl)parent.getProperty("jcr:data");
               data = ((PropertyData)propertyImpl.getData()).getValues().get(0).getAsStream();
            }
            catch (PathNotFoundException e)
            {
               return false;
            }
View Full Code Here

Examples of org.exoplatform.services.jcr.impl.core.PropertyImpl

   private static Log log = ExoLogger.getLogger("exo.jcr.component.ext.AddMetadataAction");

   public boolean execute(Context ctx) throws Exception
   {

      PropertyImpl property = (PropertyImpl)ctx.get("currentItem");
      NodeImpl parent = (NodeImpl)property.getParent();
      if (!parent.isNodeType("nt:resource"))
      {
         throw new Exception("incoming node is not nt:resource type");
      }

      InputStream data = null;
      String mimeType;

      try
      {
         if (property.getInternalName().equals(Constants.JCR_DATA))
         {
            data = ((PropertyData)property.getData()).getValues().get(0).getAsStream();
            try
            {
               mimeType = parent.getProperty("jcr:mimeType").getString();
            }
            catch (PathNotFoundException e)
            {
               return false;
            }
         }
         else if (property.getInternalName().equals(Constants.JCR_MIMETYPE))
         {
            mimeType = property.getString();
            try
            {
               PropertyImpl propertyImpl = (PropertyImpl)parent.getProperty("jcr:data");
               data = ((PropertyData)propertyImpl.getData()).getValues().get(0).getAsStream();
            }
            catch (PathNotFoundException e)
            {
               return false;
            }
View Full Code Here

Examples of org.itsnat.impl.core.jsren.dom.node.PropertyImpl

        addGlobalProperty(propName,attrName,type,null);
    }

    protected void addGlobalProperty(String propName,String attrName,int type,String nullValue)
    {
        PropertyImpl property = new PropertyImpl(this,propName,attrName,type,nullValue);
        propertiesByAttrNameMSIE.put(attrName.toLowerCase(),property);
    }
View Full Code Here

Examples of org.uengine.smcp.twister.engine.priv.core.definition.impl.PropertyImpl

    }

    public static Property addProperty(TwisterProcess process, String name,
                                String type) throws DBSessionException, FinderException {

        PropertyImpl property = new PropertyImpl();
        property.setName(name);
        property.setType(type);

        TwisterProcess persistentProcess = getByName(process.getName(), process.getNamespace());
        ((ProcessImpl)persistentProcess).addProperty(property);

        ProcessDAO.create(property);
View Full Code Here

Examples of org.uengine.smcp.twister.engine.priv.core.definition.impl.PropertyImpl

* A factory to create or get specific property instances.
*/
public class PropertyFactory {

    public Property createProperty(String name, String type) throws DBSessionException {
        PropertyImpl prop = new PropertyImpl();
        prop.setName(name);
        prop.setType(type);

        prop = (PropertyImpl) PropertyDAO.create(prop);

        return prop;
    }
View Full Code Here

Examples of railo.runtime.component.PropertyImpl

  public static DateTime createDateTime(long time) {
    return creator().createDateTime(time);
  }

  public static Property createProperty(String name, String type) {
    PropertyImpl pi = new PropertyImpl();
    pi.setName(name);
    pi.setType(type);
    return pi;
  }
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.