isEqual &= (property.getStructureValue() == null); } else { isEqual &= m_structureValue.equals(property.getStructureValue());
isEqual &= (property.getStructureValue() == null); } else { isEqual &= m_structureValue.equals(property.getStructureValue());
property.setResourceValue(resolver.resolveMacros(property.getResourceValue())); if (property.getStructureValue() != null) { property.setStructureValue(resolver.resolveMacros(property.getStructureValue()));
property.setResourceValue(resolver.resolveMacros(property.getResourceValue())); if (property.getStructureValue() != null) { property.setStructureValue(resolver.resolveMacros(property.getStructureValue()));
if (property.getStructureValue() != null) { if (property.isDeleteStructureValue()) { if (existingProperty.getStructureValue() != null) { updateState = 1; // deleted if (existingProperty.getStructureValue() == null) { updateState = 1; // created } else { if (!property.getStructureValue().equals(existingProperty.getStructureValue())) { updateState = 1; // 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; }
/** * Returns the organizational unit represented by the given resource.<p> * * @param dbc the current db context * @param resource the resource that represents an organizational unit * * @return the organizational unit represented by the given resource * * @throws CmsException if something goes wrong */ protected CmsOrganizationalUnit internalCreateOrgUnitFromResource(CmsDbContext dbc, CmsResource resource) throws CmsException { if (!resource.getRootPath().startsWith(ORGUNIT_BASE_FOLDER)) { throw new CmsDataAccessException(Messages.get().container( Messages.ERR_READ_ORGUNIT_1, resource.getRootPath())); } // get the data String name = resource.getRootPath().substring(ORGUNIT_BASE_FOLDER.length()); if ((name.length() > 0) && !name.endsWith(CmsOrganizationalUnit.SEPARATOR)) { name += CmsOrganizationalUnit.SEPARATOR; } String description = m_driverManager.readPropertyObject(dbc, resource, ORGUNIT_PROPERTY_DESCRIPTION, false).getStructureValue(); int flags = (resource.getFlags() & ~CmsResource.FLAG_INTERNAL); // remove the internal flag String projectId = m_driverManager.readPropertyObject(dbc, resource, ORGUNIT_PROPERTY_PROJECTID, false).getStructureValue(); // create the object return new CmsOrganizationalUnit(resource.getStructureId(), name, description, flags, (projectId == null ? null : new CmsUUID(projectId))); }
resource, ORGUNIT_PROPERTY_DESCRIPTION, false).getStructureValue(); int flags = (resource.getFlags() & ~CmsResource.FLAG_INTERNAL); // remove the internal flag String projectId = m_driverManager.readPropertyObject( resource, ORGUNIT_PROPERTY_PROJECTID, false).getStructureValue();
resource, ORGUNIT_PROPERTY_DESCRIPTION, false).getStructureValue(); int flags = (resource.getFlags() & ~CmsResource.FLAG_INTERNAL); // remove the internal flag String projectId = m_driverManager.readPropertyObject( resource, ORGUNIT_PROPERTY_PROJECTID, false).getStructureValue();
/** * 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; }
if (oldProp.getStructureValue() != null) { newProp.setStructureValue(propertyValue); newProp.setResourceValue(oldProp.getResourceValue()); String oldStructureValue = oldProp.getStructureValue(); String newStructureValue = newProp.getStructureValue(); if (CmsStringUtil.isEmpty(oldStructureValue)) { oldStructureValue = CmsProperty.DELETE_VALUE;
if (oldProp.getStructureValue() != null) { newProp.setStructureValue(propertyValue); newProp.setResourceValue(oldProp.getResourceValue()); String oldStructureValue = oldProp.getStructureValue(); String newStructureValue = newProp.getStructureValue(); if (CmsStringUtil.isEmpty(oldStructureValue)) { oldStructureValue = CmsProperty.DELETE_VALUE;
if (oldProp.getStructureValue() != null) { newProp.setStructureValue(propertyValue); newProp.setResourceValue(oldProp.getResourceValue()); String oldStructureValue = oldProp.getStructureValue(); String newStructureValue = newProp.getStructureValue(); if (CmsStringUtil.isEmpty(oldStructureValue)) { oldStructureValue = CmsProperty.DELETE_VALUE;
if (oldProp.getStructureValue() != null) { newProp.setStructureValue(propertyValue); newProp.setResourceValue(oldProp.getResourceValue()); String oldStructureValue = oldProp.getStructureValue(); String newStructureValue = newProp.getStructureValue(); if (CmsStringUtil.isEmpty(oldStructureValue)) { oldStructureValue = CmsProperty.DELETE_VALUE;
if (oldProp.getStructureValue() != null) { newProp.setStructureValue(propertyValue); newProp.setResourceValue(oldProp.getResourceValue()); String oldStructureValue = oldProp.getStructureValue(); String newStructureValue = newProp.getStructureValue(); if (CmsStringUtil.isEmpty(oldStructureValue)) { oldStructureValue = CmsProperty.DELETE_VALUE;
if (currentProperty.getStructureValue() != null) { currentProperty.setStructureValue(CmsProperty.DELETE_VALUE); currentProperty.setResourceValue(null); if ((currentProperty.getStructureValue() == null) && (currentProperty.getResourceValue() == null)) { currentProperty.setStructureValue(null); } else if (currentProperty.getStructureValue() != null) {
if (currentProperty.getStructureValue() != null) { currentProperty.setStructureValue(CmsProperty.DELETE_VALUE); currentProperty.setResourceValue(null); if ((currentProperty.getStructureValue() == null) && (currentProperty.getResourceValue() == null)) { currentProperty.setStructureValue(null); } else if (currentProperty.getStructureValue() != null) {
if (i == 0) { value = property.getStructureValue(); mappingType = CmsProperty.STRUCTURE_RECORD_MAPPING; id = resource.getStructureId();
currentProperty.setResourceValue(currentPropertyValue); } else if (currentProperty.getStructureValue() != null) {
currentProperty.setResourceValue(currentPropertyValue); } else if (currentProperty.getStructureValue() != null) {