isEqual &= (property.getResourceValue() == null); } else { isEqual &= m_resourceValue.equals(property.getResourceValue());
isEqual &= (property.getResourceValue() == null); } else { isEqual &= m_resourceValue.equals(property.getResourceValue());
if (property.getResourceValue() != null) { property.setResourceValue(resolver.resolveMacros(property.getResourceValue()));
if (property.getResourceValue() != null) { property.setResourceValue(resolver.resolveMacros(property.getResourceValue()));
if (property.getResourceValue() != null) { if (property.isDeleteResourceValue()) { if (existingProperty.getResourceValue() != null) { updateState = 2; // deleted if (existingProperty.getResourceValue() == null) { updateState = 2; // created } else { if (!property.getResourceValue().equals(existingProperty.getResourceValue())) { updateState = 2; // updated
if (property.getResourceValue() != null) { if (property.isDeleteResourceValue()) { if (existingProperty.getResourceValue() != null) { updateState = 2; // deleted if (existingProperty.getResourceValue() == null) { updateState = 2; // created } else { if (!property.getResourceValue().equals(existingProperty.getResourceValue())) { updateState = 2; // updated
/** * Converts CmsProperty objects to CmsClientProperty objects.<p> * * @param properties a list of server-side properties * * @return a map of client-side properties */ protected Map<String, CmsClientProperty> convertProperties(List<CmsProperty> properties) { Map<String, CmsClientProperty> result = new HashMap<String, CmsClientProperty>(); for (CmsProperty prop : properties) { CmsClientProperty clientProp = new CmsClientProperty( prop.getName(), prop.getStructureValue(), prop.getResourceValue()); clientProp.setOrigin(prop.getOrigin()); result.put(clientProp.getName(), clientProp); } return result; }
/** * Checks the shared property {@link CmsTagReplaceSettings#PROPERTY_CONTENTOOLS_TAGREPLACE} if * it has the value of this configuration ({@link CmsTagReplaceSettings#getPropertyValueTagReplaceID()}).<p> * * @param resource the resource to test. * * @return true if the property with the value was found. * * @throws CmsException if reading a property fails. */ private boolean isProcessedBefore(CmsResource resource) throws CmsException { CmsProperty testProp = getCms().readPropertyObject( resource, CmsTagReplaceSettings.PROPERTY_CONTENTOOLS_TAGREPLACE, false); if (testProp.isNullProperty()) { return false; } else { String testValue = testProp.getResourceValue(); if (CmsStringUtil.isEmptyOrWhitespaceOnly(testValue)) { return false; } else { return testValue.equals(m_settings.getPropertyValueTagReplaceID()); } } }
/** * Creates a client property bean from a server-side property.<p> * * @param prop the property from which to create the client property * @param preserveOrigin if true, the origin will be copied into the new object * * @return the new client property */ public static CmsClientProperty createClientProperty(CmsProperty prop, boolean preserveOrigin) { CmsClientProperty result = new CmsClientProperty( prop.getName(), prop.getStructureValue(), prop.getResourceValue()); if (preserveOrigin) { result.setOrigin(prop.getOrigin()); } return result; }
size += getMemorySize(property.getName()); if (property.getResourceValue() != null) { size += getMemorySize(property.getResourceValue());
value = property.getResourceValue(); mappingType = CmsProperty.RESOURCE_RECORD_MAPPING; id = resource.getResourceId();
value = entry.getKey().getResourceValue(); mappingType = CmsProperty.RESOURCE_RECORD_MAPPING; id = resource.getResourceId();
if (oldProp.getStructureValue() != null) { newProp.setStructureValue(propertyValue); newProp.setResourceValue(oldProp.getResourceValue()); } else { newProp.setResourceValue(propertyValue); String oldResourceValue = oldProp.getResourceValue(); String newResourceValue = newProp.getResourceValue(); if (CmsStringUtil.isEmpty(oldResourceValue)) { oldResourceValue = CmsProperty.DELETE_VALUE;
if (oldProp.getStructureValue() != null) { newProp.setStructureValue(propertyValue); newProp.setResourceValue(oldProp.getResourceValue()); } else { newProp.setResourceValue(propertyValue); String oldResourceValue = oldProp.getResourceValue(); String newResourceValue = newProp.getResourceValue(); if (CmsStringUtil.isEmpty(oldResourceValue)) { oldResourceValue = CmsProperty.DELETE_VALUE;
if (oldProp.getStructureValue() != null) { newProp.setStructureValue(propertyValue); newProp.setResourceValue(oldProp.getResourceValue()); } else { newProp.setResourceValue(propertyValue); String oldResourceValue = oldProp.getResourceValue(); String newResourceValue = newProp.getResourceValue(); if (CmsStringUtil.isEmpty(oldResourceValue)) { oldResourceValue = CmsProperty.DELETE_VALUE;
if (oldProp.getStructureValue() != null) { newProp.setStructureValue(propertyValue); newProp.setResourceValue(oldProp.getResourceValue()); } else { newProp.setResourceValue(propertyValue); String oldResourceValue = oldProp.getResourceValue(); String newResourceValue = newProp.getResourceValue(); if (CmsStringUtil.isEmpty(oldResourceValue)) { oldResourceValue = CmsProperty.DELETE_VALUE;
if (oldProp.getStructureValue() != null) { newProp.setStructureValue(propertyValue); newProp.setResourceValue(oldProp.getResourceValue()); } else { newProp.setResourceValue(propertyValue); String oldResourceValue = oldProp.getResourceValue(); String newResourceValue = newProp.getResourceValue(); if (CmsStringUtil.isEmpty(oldResourceValue)) { oldResourceValue = CmsProperty.DELETE_VALUE;
value = property.getResourceValue(); mappingType = CmsProperty.RESOURCE_RECORD_MAPPING; id = resource.getResourceId();
currentProperty.setResourceValue(null); writeProperty = true; } else if (currentProperty.getResourceValue() != null) { currentProperty.setResourceValue(CmsProperty.DELETE_VALUE); currentProperty.setStructureValue(null); if ((currentProperty.getStructureValue() == null) && (currentProperty.getResourceValue() == null)) {
currentProperty.setResourceValue(null); writeProperty = true; } else if (currentProperty.getResourceValue() != null) { currentProperty.setResourceValue(CmsProperty.DELETE_VALUE); currentProperty.setStructureValue(null); if ((currentProperty.getStructureValue() == null) && (currentProperty.getResourceValue() == null)) {