Displays property value as string

@param pd the property definition
@param p the property to display
@return property value as text string
@throws RepositoryException
188960
private String values( PropertyDefinition pd, Property p ) throws RepositoryException {
        if (p == null) {
            return "N/A";
        }
        
        if (pd.getRequiredType() == PropertyType.BINARY) {
            return "BINARY";
        }
        
        if (!p.isMultiple()) {
            return p.getString();
        }

        return multiValue(p);
    }
1312347
protected String colorString(PDColor pdcolor)
    {
        String color = null;
        try
        {
            float[] rgb = pdcolor.getColorSpace().toRGB(pdcolor.getComponents());
            color = colorString(rgb[0], rgb[1], rgb[2]);
        } catch (IOException e) {
            log.error("colorString: IOException: {}", e.getMessage());
        } catch (UnsupportedOperationException e) {
            log.error("colorString: UnsupportedOperationException: {}", e.getMessage());
        }
        return color;
    }
1350003
private Collection<JcrProperty> getProperties( String repository, String workspace, String path, Node node ) throws RepositoryException {
        ArrayList<PropertyDefinition> names = new ArrayList<>();
        
        NodeType primaryType = node.getPrimaryNodeType();
        PropertyDefinition[] defs = primaryType.getPropertyDefinitions();

        names.addAll(Arrays.asList(defs));
        
        NodeType[] mixinType = node.getMixinNodeTypes();
        for (NodeType type : mixinType) {
            defs = type.getPropertyDefinitions();
            names.addAll(Arrays.asList(defs));
        }

        ArrayList<JcrProperty> list = new ArrayList<>();
        for (PropertyDefinition def :  names) {
            
            String name = def.getName();
            String type = PropertyType.nameFromValue(def.getRequiredType());
            
            Property p = null;
            try {
                p = node.getProperty(def.getName());
            } catch (PathNotFoundException e) {
            }

            String display = values(def, p);
            String value = def.isMultiple() ? multiValue(p)
                    : singleValue(p, def, repository, workspace, path);
            list.add(new JcrProperty(name, type, value, display));
            
        }
        return list;
    }
62800
public static String serialize(Method method, Object data) throws SerializationException {

        String result = RPC.encodeResponseForSuccess(method, data, CmsPrefetchSerializationPolicy.instance());
        result = CmsEncoder.escapeXml(result, true);
        return result;
    }
13879
@Override
  public final <T> T retrieveEntityById(final Map<String, Object> pAddParam,
    final Class<T> pEntityClass, final Object pItsId) throws Exception {
    String query = evalSqlSelect(pAddParam, pEntityClass);
    @SuppressWarnings("unchecked")
    IFactorySimple<T> facEn = (IFactorySimple<T>) this.entitiesFactoriesFatory
      .lazyGet(pAddParam, pEntityClass);
    T entity = facEn.create(pAddParam);
    @SuppressWarnings("unchecked")
    IFillerObjectFields<T> filler = (IFillerObjectFields<T>)
      this.fctFillersObjectFields.lazyGet(pAddParam, pEntityClass);
    String idFldName = this.tablesMap
      .get(pEntityClass.getSimpleName()).getIdFieldName();
    filler.fill(pAddParam, entity, pItsId, idFldName);
    pAddParam.put("isOnlyId", Boolean.TRUE);
    ColumnsValues columnsValues = evalColumnsValues(pAddParam, entity);
    pAddParam.remove("isOnlyId");
    String whereId = evalWhereId(entity, columnsValues);
    return retrieveEntity(pAddParam, pEntityClass,
      query + " where " + whereId + ";\n");
  }
248069
private String convertPropertyToFieldValue(CmsProperty prop) {

        if (prop == null) {
            return "";
        }
        return "" + Boolean.valueOf(prop.getValue());
    }
1372817
@Override
  public final T fromString(final Map<String, Object> pAddParam,
    final String pStrVal) throws Exception {
    T entity = null;
    if (pStrVal != null && !"".equals(pStrVal)) {
      entity = this.entityClass.newInstance();
      ID idVal = this.idConverter.fromString(pAddParam, pStrVal);
      this.setterId.invoke(entity, idVal);
    }
    return entity;
  }
156848
public final TextBuilder p(char c) {
        if (null != __buffer) __append(c);
        else __caller.p(c);
        return this;
    }
148226
public String getName(P property)
  {
    Preconditions.checkNotNull(property);
    return converter.convert(property);
  }
978604
public void set(String propName, Object value) {
        if (propName.equals("repositoryId")) {
            setRepositoryId(((String) value));
        }
        if (propName.equals("repositoryCheckPoint")) {
            setRepositoryCheckPoint(((String) value));
        }
    }
438304
@Override
  public final String toDdMmYy(final Date pDate,
    final Map<String, Object> pAddParam) throws Exception {
    return this.dateDdMmYy.format(pDate);
  }
179055
@Override
  public final String toDateTimeSecMsString(final Date pDate,
    final Map<String, Object> pAddParam) throws Exception {
    return this.dateTimeSecMsFormat.format(pDate);
  }
634489
@Around(value = "execution(* *(..)) && (@annotation(tagReturnValue))")
	public Object doTagging(ProceedingJoinPoint pjp, TagReturnValue tagReturnValue) throws Throwable {
		Object result = pjp.proceed();
		MoSKitoContext.addTag(tagReturnValue.name(), result == null ? null : result.toString(), TagType.ANNOTATED, pjp.getSignature().toShortString());
		return result;
	}
1366345
public static String getReference(ValueData valueData) throws RepositoryException
   {
      if (valueData instanceof TransientValueData)
      {
         return getReference(((TransientValueData)valueData).delegate);
      }

      return ((AbstractValueData)valueData).getReference();
   }
985713
@Override
  public String getStringProperty(final String name) throws OptionsException {
    Object val = getProperty(name);

    if (!(val instanceof String)) {
      throw new OptionsException("org.bedework.calenv.bad.option.value");
    }

    return (String)val;
  }
263379
@Override
    public int propertyNameToCType(byte[]name, int p, int end) {
        byte[]buf = new byte[PROPERTY_NAME_MAX_SIZE];
        int len = 0;

        for(int p_ = p; p_ < end; p_+= length(name, p_, end)) {
            int code = mbcToCode(name, p_, end);
            if (code == ' ' || code == '-' || code == '_') continue;
            if (code >= 0x80) throw new CharacterPropertyException(EncodingError.ERR_INVALID_CHAR_PROPERTY_NAME, name, p, end);
            buf[len++] = (byte)code;
            if (len >= PROPERTY_NAME_MAX_SIZE) throw new CharacterPropertyException(EncodingError.ERR_INVALID_CHAR_PROPERTY_NAME, name, p, end);
        }

        Integer ctype = CTypeName.Values.get(buf, 0, len);
        if (ctype == null) throw new CharacterPropertyException(EncodingError.ERR_INVALID_CHAR_PROPERTY_NAME, name, p, end);
        return ctype;
    }
105452
private void addRuntimeNameProperty() throws RepositoryException {
		
		String statement = 
				"/jcr:root" + ISO9075.encodePath(StorageConstants.REPORTS_ROOT) + 
				"//*[@className='ro.nextreports.server.domain.Report']" + 
				"//*[fn:name()='parametersValues']";
		  
		QueryResult queryResult = getTemplate().query(statement);

		NodeIterator nodes = queryResult.getNodes();
		
		LOG.info("RuntimeHistory : Found " + nodes.getSize() + " parameterValues nodes");
		while (nodes.hasNext()) {			
			Node node = nodes.nextNode();
			NodeIterator childrenIt = node.getNodes();
			while (childrenIt.hasNext()) {
				Node child = childrenIt.nextNode();				
				child.setProperty("runtimeName", child.getName());
			}
		}	
		getTemplate().save();		
	}