public static boolean propNeedsTranslation(String propertyName) { return SVNProperty.isSVNProperty(propertyName); }
public static boolean propNeedsTranslation(String propertyName) { return SVNProperty.isSVNProperty(propertyName); }
public static boolean propNeedsTranslation(String propertyName) { return SVNProperty.isSVNProperty(propertyName); }
/** * Constructs an <b>SVNPropertyData</b> given a property name and its * value. * * @param name a property name * @param data a property value */ public SVNPropertyData(String name, String data) { myName = name; myValue = data; if (myValue != null && SVNProperty.isSVNProperty(myName)) { myValue = myValue.replaceAll("\n", System.getProperty("line.separator")); } }
private static boolean hasSVNProperties(SVNProperties props) { if (props == null) { return false; } for (Iterator names = props.nameSet().iterator(); names.hasNext();) { String propName = (String) names.next(); if (SVNProperty.isSVNProperty(propName)) { return true; } } return false; }
private boolean useStringProperty(DAVElement element, String propertyName) { String namespace = element == null ? null : element.getNamespace(); return SVNProperty.isSVNProperty(propertyName) || DAVElement.SVN_DAV_PROPERTY_NAMESPACE.equals(namespace) || DAVElement.SVN_SVN_PROPERTY_NAMESPACE.equals(namespace) || DAVElement.SVN_NAMESPACE.equals(namespace) || DAVElement.DAV_NAMESPACE.equals(namespace); }
private static boolean hasSVNProperties(SVNProperties props) { if (props == null) { return false; } for (Iterator names = props.nameSet().iterator(); names.hasNext();) { String propName = (String) names.next(); if (SVNProperty.isSVNProperty(propName)) { return true; } } return false; }
private static boolean hasSVNProperties(SVNProperties props) { if (props == null) { return false; } for (Iterator names = props.nameSet().iterator(); names.hasNext();) { String propName = (String) names.next(); if (SVNProperty.isSVNProperty(propName)) { return true; } } return false; }
return value; if (SVNProperty.isSVNProperty(name)) { value = value.replaceAll("\r\n", "\n"); value = value.replace('\r', '\n');
return null; if (SVNProperty.isSVNProperty(propertyName)) { String value; try {
return null; if (SVNProperty.isSVNProperty(propertyName)) { String value; try {
return null; if (SVNProperty.isSVNProperty(propertyName)) { String value; try {
/** * Constructs an <b>SVNPropertyData</b> given a property name and its * value. * * <p> * if <code>data</code> is not <span class="javakeyword">null</span>, is a * {@link SVNPropertyValue#isString() string} property and <code>name</code> is an * {@link SVNProperty#isSVNProperty(String) svn-namespace} property name, then <code>options</code>, * if not <span class="javakeyword">null</span>, is used to translate the property value replacing * all LF end of line markers in the property value with ones returned by {@link ISVNOptions#getNativeEOL()}. * Otherwise, if <code>options</code> is <span class="javakeyword">null</span>, * the <span class="javastring">"line.separator"</span> system property is used to retrieve a new EOL marker. * * @param name a property name * @param data a property value * @param options provides EOL style information */ public SVNPropertyData(String name, SVNPropertyValue data, ISVNOptions options) { myName = name; myValue = data; if (myValue != null && SVNProperty.isSVNProperty(myName) && myValue.isString()) { String nativeEOL = options == null ? System.getProperty("line.separator") : new String(options.getNativeEOL()); myValue = SVNPropertyValue.create(myValue.getString().replaceAll("\n", nativeEOL)); } }
/** * Constructs an <b>SVNPropertyData</b> given a property name and its * value. * * <p> * if <code>data</code> is not <span class="javakeyword">null</span>, is a * {@link SVNPropertyValue#isString() string} property and <code>name</code> is an * {@link SVNProperty#isSVNProperty(String) svn-namespace} property name, then <code>options</code>, * if not <span class="javakeyword">null</span>, is used to translate the property value replacing * all LF end of line markers in the property value with ones returned by {@link ISVNOptions#getNativeEOL()}. * Otherwise, if <code>options</code> is <span class="javakeyword">null</span>, * the <span class="javastring">"line.separator"</span> system property is used to retrieve a new EOL marker. * * @param name a property name * @param data a property value * @param options provides EOL style information */ public SVNPropertyData(String name, SVNPropertyValue data, ISVNOptions options) { myName = name; myValue = data; if (myValue != null && SVNProperty.isSVNProperty(myName) && myValue.isString()) { String nativeEOL = options == null ? System.getProperty("line.separator") : new String(options.getNativeEOL()); myValue = SVNPropertyValue.create(myValue.getString().replaceAll("\n", nativeEOL)); } }
/** * Constructs an <b>SVNPropertyData</b> given a property name and its * value. * * <p> * if <code>data</code> is not <span class="javakeyword">null</span>, is a * {@link SVNPropertyValue#isString() string} property and <code>name</code> is an * {@link SVNProperty#isSVNProperty(String) svn-namespace} property name, then <code>options</code>, * if not <span class="javakeyword">null</span>, is used to translate the property value replacing * all LF end of line markers in the property value with ones returned by {@link ISVNOptions#getNativeEOL()}. * Otherwise, if <code>options</code> is <span class="javakeyword">null</span>, * the <span class="javastring">"line.separator"</span> system property is used to retrieve a new EOL marker. * * @param name a property name * @param data a property value * @param options provides EOL style information */ public SVNPropertyData(String name, SVNPropertyValue data, ISVNOptions options) { myName = name; myValue = data; if (myValue != null && SVNProperty.isSVNProperty(myName) && myValue.isString()) { String nativeEOL = options == null ? System.getProperty("line.separator") : new String(options.getNativeEOL()); if (myValue.getString().indexOf(nativeEOL) < 0) { myValue = SVNPropertyValue.create(myValue.getString().replaceAll("\n", nativeEOL)); } } }
private static StringBuffer appendProperty(StringBuffer xmlBuffer, String name, SVNPropertyValue value) { String prefix = SVNProperty.isSVNProperty(name) && !SVNProperty.isSVNKitProperty(name) ? SVNXMLUtil.SVN_SVN_PROPERTY_PREFIX : SVNXMLUtil.SVN_CUSTOM_PROPERTY_PREFIX; String tagName = SVNProperty.shortPropertyName(name);
private static StringBuffer appendProperty(StringBuffer xmlBuffer, String name, SVNPropertyValue value) { String prefix = SVNProperty.isSVNProperty(name) && !SVNProperty.isSVNKitProperty(name) ? SVNXMLUtil.SVN_SVN_PROPERTY_PREFIX : SVNXMLUtil.SVN_CUSTOM_PROPERTY_PREFIX; String tagName = SVNProperty.shortPropertyName(name);
public static void validateProperty(String propertyName, SVNPropertyValue propertyValue) throws SVNException { if (!SVNProperty.isRegularProperty(propertyName)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.REPOS_BAD_ARGS, "Storage of non-regular property ''{0}'' is disallowed through the repository interface, and could indicate a bug in your client", propertyName); SVNErrorManager.error(err, SVNLogType.FSFS); } if (SVNProperty.isSVNProperty(propertyName) && propertyValue != null) { if (SVNRevisionProperty.DATE.equals(propertyName)) { try { SVNDate.parseDateString(propertyValue.getString()); } catch (SVNException svne) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.BAD_PROPERTY_VALUE); SVNErrorManager.error(err, SVNLogType.FSFS); } } } }
public static void validateProperty(String propertyName, SVNPropertyValue propertyValue) throws SVNException { if (!SVNProperty.isRegularProperty(propertyName)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.REPOS_BAD_ARGS, "Storage of non-regular property ''{0}'' is disallowed through the repository interface, and could indicate a bug in your client", propertyName); SVNErrorManager.error(err, SVNLogType.FSFS); } if (SVNProperty.isSVNProperty(propertyName) && propertyValue != null) { if (SVNRevisionProperty.DATE.equals(propertyName)) { try { SVNDate.parseDateString(propertyValue.getString()); } catch (SVNException svne) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.BAD_PROPERTY_VALUE); SVNErrorManager.error(err, SVNLogType.FSFS); } } } }
public static void validateProperty(String propertyName, SVNPropertyValue propertyValue) throws SVNException { if (!SVNProperty.isRegularProperty(propertyName)) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.REPOS_BAD_ARGS, "Storage of non-regular property ''{0}'' is disallowed through the repository interface, and could indicate a bug in your client", propertyName); SVNErrorManager.error(err, SVNLogType.FSFS); } if (SVNProperty.isSVNProperty(propertyName) && propertyValue != null) { if (SVNRevisionProperty.DATE.equals(propertyName)) { try { SVNDate.parseDateString(propertyValue.getString()); } catch (SVNException svne) { SVNErrorMessage err = SVNErrorMessage.create(SVNErrorCode.BAD_PROPERTY_VALUE); SVNErrorManager.error(err, SVNLogType.FSFS); } } } }