/** * Creates a clone of this property.<p> * * @return a clone of this property * * @see #cloneAsProperty() */ @Override public Object clone() { return cloneAsProperty(); }
/** * Creates a clone of this property.<p> * * @return a clone of this property * * @see #cloneAsProperty() */ @Override public CmsProperty clone() { return cloneAsProperty(); }
/** * Reads a property object from a resource specified by a property name.<p> * * Returns <code>{@link CmsProperty#getNullProperty()}</code> if the property is not found.<p> * * @param dbc the current database context * @param resource the resource where the property is read from * @param key the property key name * @param search if <code>true</code>, the property is searched on all parent folders of the resource. * if it's not found attached directly to the resource. * * @return the required property, or <code>{@link CmsProperty#getNullProperty()}</code> if the property was not found * * @throws CmsException if something goes wrong */ public CmsProperty readPropertyObject(CmsDbContext dbc, CmsResource resource, String key, boolean search) throws CmsException { // NOTE: Do not call readPropertyObject(dbc, resource, key, search, null) for performance reasons // use the list reading method to obtain all properties for the resource List<CmsProperty> properties = readPropertyObjects(dbc, resource, search); int i = properties.indexOf(new CmsProperty(key, null, null)); if (i >= 0) { // property has been found in the map CmsProperty result = properties.get(i); // ensure the result value is not frozen return result.cloneAsProperty(); } return CmsProperty.getNullProperty(); }
return result.cloneAsProperty();
/** * Enumeration class for the mode parameter in the * {@link CmsDriverManager#readChangedResourcesInsideProject(CmsDbContext, CmsUUID, CmsReadChangedProjectResourceMode)} * method.<p> */ private static class CmsReadChangedProjectResourceMode { /** * Default constructor.<p> */ protected CmsReadChangedProjectResourceMode() { // noop } }
} else { currentProperty = currentProperty.cloneAsProperty();
} else { currentProperty = currentProperty.cloneAsProperty();