public static SVNPropertyValue getProperty(SVNWCAccess access, File path, String propName) throws SVNException { SVNEntry entry = access.getEntry(path, false); if (entry == null) { return null; } String[] cachableProperties = entry.getCachableProperties(); if (cachableProperties != null && contains(cachableProperties, propName)) { String[] presentProperties = entry.getPresentProperties(); if (presentProperties == null || !contains(presentProperties, propName)) { return null; } if (SVNProperty.isBooleanProperty(propName)) { return SVNProperty.getValueOfBooleanProperty(propName); } } if (SVNProperty.isWorkingCopyProperty(propName)) { return getWCProperty(access, path, propName); } else if (SVNProperty.isEntryProperty(propName)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.BAD_PROP_KIND, "Property ''{0}'' is an entry property", propName); SVNErrorManager.error(err, SVNLogType.DEFAULT); } SVNAdminArea dir = entry.getKind() == SVNNodeKind.DIR ? access.retrieve(path) : access.retrieve(path.getParentFile()); return dir.getProperties(entry.getName()).getPropertyValue(propName); }
public static SVNPropertyValue getProperty(SVNWCAccess access, File path, String propName) throws SVNException { SVNEntry entry = access.getEntry(path, false); if (entry == null) { return null; } String[] cachableProperties = entry.getCachableProperties(); if (cachableProperties != null && contains(cachableProperties, propName)) { String[] presentProperties = entry.getPresentProperties(); if (presentProperties == null || !contains(presentProperties, propName)) { return null; } if (SVNProperty.isBooleanProperty(propName)) { return SVNProperty.getValueOfBooleanProperty(propName); } } if (SVNProperty.isWorkingCopyProperty(propName)) { return getWCProperty(access, path, propName); } else if (SVNProperty.isEntryProperty(propName)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.BAD_PROP_KIND, "Property ''{0}'' is an entry property", propName); SVNErrorManager.error(err, SVNLogType.DEFAULT); } SVNAdminArea dir = entry.getKind() == SVNNodeKind.DIR ? access.retrieve(path) : access.retrieve(path.getParentFile()); return dir.getProperties(entry.getName()).getPropertyValue(propName); }
public static SVNPropertyValue getProperty(SVNWCAccess access, File path, String propName) throws SVNException { SVNEntry entry = access.getEntry(path, false); if (entry == null) { return null; } String[] cachableProperties = entry.getCachableProperties(); if (cachableProperties != null && contains(cachableProperties, propName)) { String[] presentProperties = entry.getPresentProperties(); if (presentProperties == null || !contains(presentProperties, propName)) { return null; } if (SVNProperty.isBooleanProperty(propName)) { return SVNProperty.getValueOfBooleanProperty(propName); } } if (SVNProperty.isWorkingCopyProperty(propName)) { return getWCProperty(access, path, propName); } else if (SVNProperty.isEntryProperty(propName)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.BAD_PROP_KIND, "Property ''{0}'' is an entry property", propName); SVNErrorManager.error(err, SVNLogType.DEFAULT); } SVNAdminArea dir = entry.getKind() == SVNNodeKind.DIR ? access.retrieve(path) : access.retrieve(path.getParentFile()); return dir.getProperties(entry.getName()).getPropertyValue(propName); }
public static String getProperty(SVNWCAccess access, File path, String propName) throws SVNException { SVNEntry entry = access.getEntry(path, false); if (entry == null) { return null; } String[] cachableProperties = entry.getCachableProperties(); if (cachableProperties != null && contains(cachableProperties, propName)) { String[] presentProperties = entry.getPresentProperties(); if (presentProperties == null || !contains(presentProperties, propName)) { return null; } if (SVNProperty.isBooleanProperty(propName)) { return SVNProperty.getValueOfBooleanProperty(propName); } } if (SVNProperty.isWorkingCopyProperty(propName)) { return getWCProperty(access, path, propName); } else if (SVNProperty.isEntryProperty(propName)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.BAD_PROP_KIND, "Property ''{0}'' is an entry property", propName); SVNErrorManager.error(err); } SVNAdminArea dir = entry.getKind() == SVNNodeKind.DIR ? access.retrieve(path) : access.retrieve(path.getParentFile()); return dir.getProperties(entry.getName()).getPropertyValue(propName); }