public static PropertyData createPropertyData(Object client, String path, String name, String value, byte[] data) { if (client instanceof SVNClientImpl){ return new JavaHLPropertyData((SVNClientImpl) client, null, path, name, value, data); } return new PropertyData((SVNClient) client, path, name, value, data); }
public PropertyData getPropertyData(){ if(myData == null){ return null; } if(myData.getValue() == null){ return null; } return myData; }
public void properties(String path, Revision revision, Revision pegRevision, int depth, String[] changelists, ProplistCallback callback) throws ClientException { if (path == null || callback == null) { return; } final PropertyData[] properties = properties(path, revision, pegRevision, JavaHLObjectFactory.getSVNDepth(depth), changelists); final Map<String, Map<String, byte[]>> propsMap = new TreeMap<String, Map<String,byte[]>>(SVNPathUtil.PATH_COMPARATOR); for (int i = 0; i < properties.length; i++) { final String propertyPath = properties[i].getPath(); if (!propsMap.containsKey(propertyPath)) { propsMap.put(propertyPath, new HashMap<String, byte[]>()); } propsMap.get(propertyPath).put(properties[i].getName(), properties[i].getData()); } for (String propertyPath : propsMap.keySet()) { final Map<String, byte[]> pathProps = propsMap.get(propertyPath); callback.singlePath(propertyPath, pathProps); } }
public void properties(String path, Revision revision, Revision pegRevision, int depth, String[] changelists, ProplistCallback callback) throws ClientException { if (path == null || callback == null) { return; } PropertyData[] properties = properties(path, revision, pegRevision, JavaHLObjectFactory.getSVNDepth(depth), changelists); Map propsMap = new SVNHashMap(); for (int i = 0; i < properties.length; i++) { propsMap.put(properties[i].getName(), properties[i].getValue()); } callback.singlePath(path, propsMap); }
public void remove(boolean recurse) throws ClientException { if (myClientImpl != null) { myClientImpl.propertyRemove(getPath(), getName(), recurse); } else { super.remove(recurse); } }
public void setValue(byte[] newValue, boolean recurse) throws ClientException { if (myClientImpl != null) { myClientImpl.propertySet(getPath(), getName(), newValue, recurse); } else { super.setValue(newValue, recurse); } }
public void properties(String path, Revision revision, Revision pegRevision, int depth, String[] changelists, ProplistCallback callback) throws ClientException { if (path == null || callback == null) { return; } PropertyData[] properties = properties(path, revision, pegRevision, JavaHLObjectFactory.getSVNDepth(depth), changelists); Map propsMap = new SVNHashMap(); for (int i = 0; i < properties.length; i++) { propsMap.put(properties[i].getName(), properties[i].getValue()); } callback.singlePath(path, propsMap); }
public void setValue(byte[] newValue, boolean recurse) throws ClientException { if (myClientImpl != null) { myClientImpl.propertySet(getPath(), getName(), newValue, recurse); } else { super.remove(recurse); } }
public void setValue(String newValue, boolean recurse) throws ClientException { if (myClientImpl != null) { myClientImpl.propertySet(getPath(), getName(), newValue, recurse); } else { super.setValue(newValue, recurse); } } }
public void testSetRevProp() throws SubversionException, IOException { OneTest thisTest = new OneTest(false); final String MSG = "Initial repository creation"; admin.setRevProp(thisTest.getRepositoryPath(), Revision.getInstance(0), "svn:log", MSG, false, false); PropertyData[] pdata = client.revProperties( makeReposUrl(thisTest.getRepository()), Revision.getInstance(0)); assertNotNull("expect non null rev props"); String logMessage = null; for (int i = 0; i < pdata.length; i++) { if ("svn:log".equals(pdata[i].getName())) { logMessage = pdata[i].getValue(); break; } } assertEquals("expect rev prop change to take effect", MSG, logMessage); } public void testLoadRepo()
/** * @deprecated Use {@link #properties(String, Revision, Revision, * int, String[], ProplistCallback)} * instead. * @since 1.2 */ public PropertyData[] properties(String path, Revision revision, Revision pegRevision) throws ClientException { ProplistCallbackImpl callback = new ProplistCallbackImpl(); properties(path, revision, pegRevision, Depth.empty, null, callback); Map propMap = callback.getProperties(path); if (propMap == null) return new PropertyData[0]; PropertyData[] props = new PropertyData[propMap.size()]; Iterator it = propMap.keySet().iterator(); int i = 0; while (it.hasNext()) { String key = (String) it.next(); props[i] = new PropertyData(path, key, (String) propMap.get(key)); i++; } return props; }
public void remove(boolean recurse) throws ClientException { if (myClientImpl != null) { myClientImpl.propertyRemove(getPath(), getName(), recurse); } else { super.remove(recurse); } }
public PropertyData getPropertyData(){ if(myData == null){ return null; } if(myData.getValue() == null){ return null; } return myData; }
public void setValue(byte[] newValue, boolean recurse) throws ClientException { if (myClientImpl != null) { myClientImpl.propertySet(getPath(), getName(), newValue, recurse); } else { super.setValue(newValue, recurse); } }
/** * @deprecated Use {@link #properties(String, Revision, Revision, * int, String[], ProplistCallback)} * instead. * @since 1.2 */ public PropertyData[] properties(String path, Revision revision, Revision pegRevision) throws ClientException { ProplistCallbackImpl callback = new ProplistCallbackImpl(); properties(path, revision, pegRevision, Depth.empty, null, callback); Map propMap = callback.getProperties(path); if (propMap == null) return new PropertyData[0]; PropertyData[] props = new PropertyData[propMap.size()]; Iterator it = propMap.keySet().iterator(); int i = 0; while (it.hasNext()) { String key = (String) it.next(); props[i] = new PropertyData(path, key, (String) propMap.get(key)); i++; } return props; }
public void setValue(String newValue, boolean recurse) throws ClientException { if (myClientImpl != null) { myClientImpl.propertySet(getPath(), getName(), newValue, recurse); } else { super.remove(recurse); } } }
public PropertyData getPropertyData(){ if(myData == null){ return null; } if(myData.getValue() == null){ return null; } return myData; }
public void setValue(String newValue, boolean recurse) throws ClientException { if (myClientImpl != null) { myClientImpl.propertySet(getPath(), getName(), newValue, recurse); } else { super.setValue(newValue, recurse); } } }