Author: elvisisking
Date: 2010-01-04 15:58:21 -0500 (Mon, 04 Jan 2010)
New Revision: 1523
Modified:
trunk/dna-common/src/main/java/org/jboss/dna/common/util/ClassUtil.java
trunk/dna-common/src/test/java/org/jboss/dna/common/util/HashCodeTest.java
trunk/extensions/dna-sequencer-ddl/src/main/java/org/jboss/dna/sequencer/ddl/dialect/derby/DerbyDdlLexicon.java
trunk/extensions/dna-sequencer-ddl/src/main/java/org/jboss/dna/sequencer/ddl/dialect/oracle/OracleDdlLexicon.java
trunk/extensions/dna-sequencer-ddl/src/main/java/org/jboss/dna/sequencer/ddl/dialect/postgres/PostgresDdlLexicon.java
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/IJcrConstants.java
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/Status.java
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/Utils.java
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/http/HttpClientConnection.java
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/json/FileNode.java
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/json/FolderNode.java
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/json/IJsonConstants.java
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/json/JsonNode.java
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/json/JsonRestClient.java
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/json/JsonUtils.java
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/json/RepositoryNode.java
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/json/ServerNode.java
trunk/web/dna-web-jcr-rest-client/src/test/java/org/jboss/dna/web/jcr/rest/client/StatusTest.java
trunk/web/dna-web-jcr-rest-client/src/test/java/org/jboss/dna/web/jcr/rest/client/UtilsTest.java
trunk/web/dna-web-jcr-rest-client/src/test/java/org/jboss/dna/web/jcr/rest/client/domain/RepositoryTest.java
trunk/web/dna-web-jcr-rest-client/src/test/java/org/jboss/dna/web/jcr/rest/client/domain/ServerTest.java
trunk/web/dna-web-jcr-rest-client/src/test/java/org/jboss/dna/web/jcr/rest/client/domain/WorkspaceTest.java
trunk/web/dna-web-jcr-rest-client/src/test/java/org/jboss/dna/web/jcr/rest/client/json/JsonRestClientTest.java
Log:
DNA-619 Remove Eclipse IDE Comments That Denote A String Need Not Be Externalized: All
//NON-NLS-x$ comments have been removed from the codebase.
Modified: trunk/dna-common/src/main/java/org/jboss/dna/common/util/ClassUtil.java
===================================================================
--- trunk/dna-common/src/main/java/org/jboss/dna/common/util/ClassUtil.java 2010-01-04
20:11:45 UTC (rev 1522)
+++ trunk/dna-common/src/main/java/org/jboss/dna/common/util/ClassUtil.java 2010-01-04
20:58:21 UTC (rev 1523)
@@ -94,7 +94,7 @@
private static boolean addSeparator( boolean separatorNeeded,
StringBuffer text ) {
if (separatorNeeded) {
- text.append(", "); //$NON-NLS-1$
+ text.append(", ");
}
return true;
}
@@ -125,7 +125,7 @@
*/
public static String nonPackageQualifiedName( final Class<?> clazz ) {
// if (clazz == null) {
- // throw new IllegalArgumentException(I18n.format(CommonI18n.mustNotBeNull,
"Class")); //$NON-NLS-1$
+ // throw new IllegalArgumentException(I18n.format(CommonI18n.mustNotBeNull,
"Class"));
// }
String name = clazz.getName();
return name.substring(name.lastIndexOf('.') + 1);
@@ -138,7 +138,7 @@
*/
public static String nonPackageQualifiedName( final Object object ) {
// if (object == null) {
- // throw new IllegalArgumentException(I18n.format(CommonI18n.mustNotBeNull,
"Object")); //$NON-NLS-1$
+ // throw new IllegalArgumentException(I18n.format(CommonI18n.mustNotBeNull,
"Object"));
// }
return nonPackageQualifiedName(object.getClass());
}
Modified: trunk/dna-common/src/test/java/org/jboss/dna/common/util/HashCodeTest.java
===================================================================
--- trunk/dna-common/src/test/java/org/jboss/dna/common/util/HashCodeTest.java 2010-01-04
20:11:45 UTC (rev 1522)
+++ trunk/dna-common/src/test/java/org/jboss/dna/common/util/HashCodeTest.java 2010-01-04
20:58:21 UTC (rev 1523)
@@ -59,7 +59,7 @@
@Test
public void shouldAcceptNullArguments() {
assertThat(HashCode.compute((Object)null), is(0));
- assertThat(HashCode.compute("abc", (Object)null), is(not(0)));
//$NON-NLS-1$
+ assertThat(HashCode.compute("abc", (Object)null), is(not(0)));
}
}
Modified:
trunk/extensions/dna-sequencer-ddl/src/main/java/org/jboss/dna/sequencer/ddl/dialect/derby/DerbyDdlLexicon.java
===================================================================
---
trunk/extensions/dna-sequencer-ddl/src/main/java/org/jboss/dna/sequencer/ddl/dialect/derby/DerbyDdlLexicon.java 2010-01-04
20:11:45 UTC (rev 1522)
+++
trunk/extensions/dna-sequencer-ddl/src/main/java/org/jboss/dna/sequencer/ddl/dialect/derby/DerbyDdlLexicon.java 2010-01-04
20:58:21 UTC (rev 1523)
@@ -84,7 +84,7 @@
public static final Name TYPE_DROP_SYNONYM_STATEMENT = new
BasicName(Namespace.URI, "dropSynonymStatement");
public static final Name TYPE_DROP_TRIGGER_STATEMENT = new
BasicName(Namespace.URI, "dropTriggerStatement");
- public static final Name UNIQUE_INDEX = new BasicName(Namespace.URI,
"unique"); //$NON-NLS-1$
- public static final Name TABLE_NAME = new BasicName(Namespace.URI,
"tableName"); //$NON-NLS-1$
- public static final Name GENERATED_COLUMN_SPEC_CLAUSE = new BasicName(Namespace.URI,
"generatedColumnSpecClause"); //$NON-NLS-1$
+ public static final Name UNIQUE_INDEX = new BasicName(Namespace.URI,
"unique");
+ public static final Name TABLE_NAME = new BasicName(Namespace.URI,
"tableName");
+ public static final Name GENERATED_COLUMN_SPEC_CLAUSE = new BasicName(Namespace.URI,
"generatedColumnSpecClause");
}
Modified:
trunk/extensions/dna-sequencer-ddl/src/main/java/org/jboss/dna/sequencer/ddl/dialect/oracle/OracleDdlLexicon.java
===================================================================
---
trunk/extensions/dna-sequencer-ddl/src/main/java/org/jboss/dna/sequencer/ddl/dialect/oracle/OracleDdlLexicon.java 2010-01-04
20:11:45 UTC (rev 1522)
+++
trunk/extensions/dna-sequencer-ddl/src/main/java/org/jboss/dna/sequencer/ddl/dialect/oracle/OracleDdlLexicon.java 2010-01-04
20:58:21 UTC (rev 1523)
@@ -37,7 +37,7 @@
}
// MIXINS
- public static final Name TYPE_BACKSLASH_TERMINATOR = new BasicName(Namespace.URI,
"backslashTerminator"); //$NON-NLS-1$
+ public static final Name TYPE_BACKSLASH_TERMINATOR = new BasicName(Namespace.URI,
"backslashTerminator");
public static final Name TYPE_CREATE_CLUSTER_STATEMENT = new
BasicName(Namespace.URI, "createIndexStatement");
public static final Name TYPE_CREATE_CONTEXT_STATEMENT = new
BasicName(Namespace.URI, "createContextStatement");
@@ -151,11 +151,11 @@
public static final Name TYPE_RENAME_CONSTRAINT = new BasicName(Namespace.URI,
"renameConstraint");
// PROPERTY NAMES
- public static final Name TARGET_OBJECT_TYPE = new BasicName(Namespace.URI,
"targetObjectType"); //$NON-NLS-1$
- public static final Name TARGET_OBJECT_NAME = new BasicName(Namespace.URI,
"targetObjectName"); //$NON-NLS-1$
- public static final Name COMMENT = new BasicName(Namespace.URI, "comment");
//$NON-NLS-1$
- public static final Name UNIQUE_INDEX = new BasicName(Namespace.URI,
"unique"); //$NON-NLS-1$
- public static final Name BITMAP_INDEX = new BasicName(Namespace.URI,
"bitmap"); //$NON-NLS-1$
- public static final Name TABLE_NAME = new BasicName(Namespace.URI,
"tableName"); //$NON-NLS-1$
+ public static final Name TARGET_OBJECT_TYPE = new BasicName(Namespace.URI,
"targetObjectType");
+ public static final Name TARGET_OBJECT_NAME = new BasicName(Namespace.URI,
"targetObjectName");
+ public static final Name COMMENT = new BasicName(Namespace.URI,
"comment");
+ public static final Name UNIQUE_INDEX = new BasicName(Namespace.URI,
"unique");
+ public static final Name BITMAP_INDEX = new BasicName(Namespace.URI,
"bitmap");
+ public static final Name TABLE_NAME = new BasicName(Namespace.URI,
"tableName");
}
Modified:
trunk/extensions/dna-sequencer-ddl/src/main/java/org/jboss/dna/sequencer/ddl/dialect/postgres/PostgresDdlLexicon.java
===================================================================
---
trunk/extensions/dna-sequencer-ddl/src/main/java/org/jboss/dna/sequencer/ddl/dialect/postgres/PostgresDdlLexicon.java 2010-01-04
20:11:45 UTC (rev 1522)
+++
trunk/extensions/dna-sequencer-ddl/src/main/java/org/jboss/dna/sequencer/ddl/dialect/postgres/PostgresDdlLexicon.java 2010-01-04
20:58:21 UTC (rev 1523)
@@ -138,7 +138,7 @@
public static final Name SCHEMA_NAME = new BasicName(Namespace.URI,
"schemaName");
// PROPERTY NAMES
- public static final Name TARGET_OBJECT_TYPE = new BasicName(Namespace.URI,
"targetObjectType"); //$NON-NLS-1$
- public static final Name TARGET_OBJECT_NAME = new BasicName(Namespace.URI,
"targetObjectName"); //$NON-NLS-1$
- public static final Name COMMENT = new BasicName(Namespace.URI, "comment");
//$NON-NLS-1$
+ public static final Name TARGET_OBJECT_TYPE = new BasicName(Namespace.URI,
"targetObjectType");
+ public static final Name TARGET_OBJECT_NAME = new BasicName(Namespace.URI,
"targetObjectName");
+ public static final Name COMMENT = new BasicName(Namespace.URI,
"comment");
}
Modified:
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/IJcrConstants.java
===================================================================
---
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/IJcrConstants.java 2010-01-04
20:11:45 UTC (rev 1522)
+++
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/IJcrConstants.java 2010-01-04
20:58:21 UTC (rev 1523)
@@ -31,41 +31,41 @@
/**
* The JCR content property name (<code>jcr:content</code>).
*/
- String CONTENT_PROPERTY = "jcr:content"; //$NON-NLS-1$
+ String CONTENT_PROPERTY = "jcr:content";
/**
* The JCR data property name (<code>jcr:data</code>).
*/
- String DATA_PROPERTY = "jcr:data/base64/"; //$NON-NLS-1$
+ String DATA_PROPERTY = "jcr:data/base64/";
/**
* The JCR file node type (<code>nt:file</code>).
*/
- String FILE_NODE_TYPE = "nt:file"; //$NON-NLS-1$
+ String FILE_NODE_TYPE = "nt:file";
/**
* The JCR folder node type (<code>nt:folder</code>).
*/
- String FOLDER_NODE_TYPE = "nt:folder"; //$NON-NLS-1$
+ String FOLDER_NODE_TYPE = "nt:folder";
/**
* The JCR data property name (<code>jcr:lastModified</code>).
*/
- String LAST_MODIFIED = "jcr:lastModified"; //$NON-NLS-1$
+ String LAST_MODIFIED = "jcr:lastModified";
/**
* The JCR data property name (<code>jcr:lastModified</code>).
*/
- String MIME_TYPE = "jcr:mimeType"; //$NON-NLS-1$
+ String MIME_TYPE = "jcr:mimeType";
/**
* The JCR primary type property name (<code>jcr:primaryType</code>).
*/
- String PRIMARY_TYPE_PROPERTY = "jcr:primaryType"; //$NON-NLS-1$
+ String PRIMARY_TYPE_PROPERTY = "jcr:primaryType";
/**
* The JCR resource node type (<code>nt:resource</code>).
*/
- String RESOURCE_NODE_TYPE = "nt:resource"; //$NON-NLS-1$
+ String RESOURCE_NODE_TYPE = "nt:resource";
}
Modified:
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/Status.java
===================================================================
---
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/Status.java 2010-01-04
20:11:45 UTC (rev 1522)
+++
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/Status.java 2010-01-04
20:58:21 UTC (rev 1523)
@@ -123,7 +123,7 @@
* @return the status message (never <code>null</code> but can be empty)
*/
public String getMessage() {
- return ((this.message == null) ? "" : this.message); //$NON-NLS-1$
+ return ((this.message == null) ? "" : this.message);
}
/**
@@ -175,11 +175,11 @@
*/
@Override
public String toString() {
- StringBuilder txt = new StringBuilder("Status "); //$NON-NLS-1$
- txt.append(this.severity.toString()).append(": "); //$NON-NLS-1$
- txt.append((getMessage().length() == 0) ? "<no message>" :
getMessage()); //$NON-NLS-1$
- txt.append(" : "); //$NON-NLS-1$
- txt.append((getException() == null) ? "<no error>" :
getException()); //$NON-NLS-1$
+ StringBuilder txt = new StringBuilder("Status ");
+ txt.append(this.severity.toString()).append(": ");
+ txt.append((getMessage().length() == 0) ? "<no message>" :
getMessage());
+ txt.append(" : ");
+ txt.append((getException() == null) ? "<no error>" :
getException());
return txt.toString();
}
Modified:
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/Utils.java
===================================================================
---
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/Utils.java 2010-01-04
20:11:45 UTC (rev 1522)
+++
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/Utils.java 2010-01-04
20:58:21 UTC (rev 1523)
@@ -68,7 +68,7 @@
public static String getMimeType( File file ) {
if (mimeTypeUtils == null) {
// load custom extensions
- InputStream stream =
Thread.currentThread().getContextClassLoader().getResourceAsStream("org/jboss/dna/web/jcr/rest/client/mime.types");
//$NON-NLS-1$
+ InputStream stream =
Thread.currentThread().getContextClassLoader().getResourceAsStream("org/jboss/dna/web/jcr/rest/client/mime.types");
Map<String, String> customMap = MimeTypeUtil.load(stream, null);
// construct
@@ -76,7 +76,7 @@
}
String mimeType = mimeTypeUtils.mimeTypeOf(file);
- return ((mimeType == null) ? "application/octet-stream" : mimeType);
//$NON-NLS-1$
+ return ((mimeType == null) ? "application/octet-stream" : mimeType);
}
//
===========================================================================================================================
Modified:
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/http/HttpClientConnection.java
===================================================================
---
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/http/HttpClientConnection.java 2010-01-04
20:11:45 UTC (rev 1522)
+++
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/http/HttpClientConnection.java 2010-01-04
20:58:21 UTC (rev 1523)
@@ -80,9 +80,9 @@
public HttpClientConnection( Server server,
URL url,
RequestMethod method ) throws Exception {
- CheckArg.isNotNull(server, "server"); //$NON-NLS-1$
- CheckArg.isNotNull(url, "url"); //$NON-NLS-1$
- CheckArg.isNotNull(method, "method"); //$NON-NLS-1$
+ CheckArg.isNotNull(server, "server");
+ CheckArg.isNotNull(url, "url");
+ CheckArg.isNotNull(method, "method");
this.httpClient = new DefaultHttpClient();
this.httpClient.getCredentialsProvider().setCredentials(new
AuthScope(url.getHost(), url.getPort()),
@@ -149,7 +149,7 @@
* @throws Exception if there is a problem writing to the connection
*/
public void write( byte[] bytes ) throws Exception {
- CheckArg.isNotNull(bytes, "bytes"); //$NON-NLS-1$
+ CheckArg.isNotNull(bytes, "bytes");
ByteArrayEntity entity = new ByteArrayEntity(bytes);
entity.setContentType(MediaType.APPLICATION_JSON);
Modified:
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/json/FileNode.java
===================================================================
---
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/json/FileNode.java 2010-01-04
20:11:45 UTC (rev 1522)
+++
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/json/FileNode.java 2010-01-04
20:58:21 UTC (rev 1523)
@@ -78,8 +78,8 @@
File file ) throws Exception {
super(file.getName());
- CheckArg.isNotNull(workspace, "workspace"); //$NON-NLS-1$
- CheckArg.isNotNull(path, "path"); //$NON-NLS-1$
+ CheckArg.isNotNull(workspace, "workspace");
+ CheckArg.isNotNull(path, "path");
this.file = file;
this.path = path;
@@ -106,8 +106,8 @@
// add required jcr:lastModified property
Calendar lastModified = Calendar.getInstance();
lastModified.setTimeInMillis(file.lastModified());
- SimpleDateFormat formatter = new
SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); //$NON-NLS-1$
- formatter.setTimeZone(TimeZone.getTimeZone("GMT")); //$NON-NLS-1$
+ SimpleDateFormat formatter = new
SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
+ formatter.setTimeZone(TimeZone.getTimeZone("GMT"));
properties.put(IJcrConstants.LAST_MODIFIED,
formatter.format(lastModified.getTime()));
// add required jcr:mimeType property (just use a default value)
@@ -143,7 +143,7 @@
* @see #getFileContentsUrl()
*/
String getFileContents( String jsonResponse ) throws Exception {
- CheckArg.isNotNull(jsonResponse, "jsonResponse"); //$NON-NLS-1$
+ CheckArg.isNotNull(jsonResponse, "jsonResponse");
JSONObject contentNode = new JSONObject(jsonResponse);
JSONObject props = (JSONObject)contentNode.get(IJsonConstants.PROPERTIES_KEY);
String encodedContents = props.getString(IJcrConstants.DATA_PROPERTY);
Modified:
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/json/FolderNode.java
===================================================================
---
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/json/FolderNode.java 2010-01-04
20:11:45 UTC (rev 1522)
+++
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/json/FolderNode.java 2010-01-04
20:58:21 UTC (rev 1523)
@@ -59,8 +59,8 @@
String fullPath ) throws Exception {
super(fullPath);
- CheckArg.isNotNull(workspace, "workspace"); //$NON-NLS-1$
- CheckArg.isNotNull(fullPath, "fullPath"); //$NON-NLS-1$
+ CheckArg.isNotNull(workspace, "workspace");
+ CheckArg.isNotNull(fullPath, "fullPath");
this.workspace = workspace;
@@ -96,12 +96,12 @@
// make sure path starts with a '/'
String path = getPath();
- if (!path.startsWith("/")) { //$NON-NLS-1$
+ if (!path.startsWith("/")) {
path = '/' + path;
}
// make sure path does NOT end with a '/'
- if (path.endsWith("/")) { //$NON-NLS-1$
+ if (path.endsWith("/")) {
path = path.substring(0, path.length() - 1);
}
Modified:
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/json/IJsonConstants.java
===================================================================
---
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/json/IJsonConstants.java 2010-01-04
20:11:45 UTC (rev 1522)
+++
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/json/IJsonConstants.java 2010-01-04
20:58:21 UTC (rev 1523)
@@ -57,21 +57,21 @@
/**
* The key in the <code>JSONObject</code> whose value is the collection
of node children.
*/
- String CHILDREN_KEY = "children"; //$NON-NLS-1$
+ String CHILDREN_KEY = "children";
/**
* The key in the <code>JSONObject</code> whose value is the collection
of node properties.
*/
- String PROPERTIES_KEY = "properties"; //$NON-NLS-1$
+ String PROPERTIES_KEY = "properties";
/**
* The server context added to URLs.
*/
- String SERVER_CONTEXT = "/resources"; //$NON-NLS-1$
+ String SERVER_CONTEXT = "/resources";
/**
* The workspace context added to the URLs.
*/
- String WORKSPACE_CONTEXT = "/items"; //$NON-NLS-1$
+ String WORKSPACE_CONTEXT = "/items";
}
Modified:
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/json/JsonNode.java
===================================================================
---
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/json/JsonNode.java 2010-01-04
20:11:45 UTC (rev 1522)
+++
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/json/JsonNode.java 2010-01-04
20:58:21 UTC (rev 1523)
@@ -50,7 +50,7 @@
* @param id the node identifier (never <code>null</code>)
*/
protected JsonNode( String id ) {
- CheckArg.isNotNull(id, "id"); //$NON-NLS-1$
+ CheckArg.isNotNull(id, "id");
this.id = id;
}
@@ -87,16 +87,16 @@
@Override
public String toString() {
StringBuilder txt = new StringBuilder();
- txt.append("ID: ").append(getId()); //$NON-NLS-1$
- txt.append(", URL: "); //$NON-NLS-1$
+ txt.append("ID: ").append(getId());
+ txt.append(", URL: ");
try {
txt.append(getUrl());
} catch (Exception e) {
- txt.append("exception obtaining URL"); //$NON-NLS-1$
+ txt.append("exception obtaining URL");
}
- txt.append(", content: ").append(super.toString()); //$NON-NLS-1$
+ txt.append(", content: ").append(super.toString());
return txt.toString();
}
Modified:
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/json/JsonRestClient.java
===================================================================
---
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/json/JsonRestClient.java 2010-01-04
20:11:45 UTC (rev 1522)
+++
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/json/JsonRestClient.java 2010-01-04
20:58:21 UTC (rev 1523)
@@ -68,7 +68,7 @@
private HttpClientConnection connect( Server server,
URL url,
RequestMethod method ) throws Exception {
- this.logger.trace("connect: url={0}, method={1}", url, method);
//$NON-NLS-1$
+ this.logger.trace("connect: url={0}, method={1}", url, method);
return new HttpClientConnection(server, url, method);
}
@@ -83,12 +83,12 @@
private void createFileNode( Workspace workspace,
String path,
File file ) throws Exception {
- this.logger.trace("createFileNode: workspace={0}, path={1}, file={2}",
workspace.getName(), path, file.getAbsolutePath()); //$NON-NLS-1$
+ this.logger.trace("createFileNode: workspace={0}, path={1}, file={2}",
workspace.getName(), path, file.getAbsolutePath());
FileNode fileNode = new FileNode(workspace, path, file);
HttpClientConnection connection = connect(workspace.getServer(),
fileNode.getUrl(), RequestMethod.POST);
try {
- this.logger.trace("createFileNode: create node={0}", fileNode);
//$NON-NLS-1$
+ this.logger.trace("createFileNode: create node={0}", fileNode);
connection.write(fileNode.getContent());
// make sure node was created
@@ -96,13 +96,13 @@
if (responseCode != HttpURLConnection.HTTP_CREATED) {
// node was not created
- this.logger.error(RestClientI18n.connectionErrorMsg, responseCode,
"createFileNode"); //$NON-NLS-1$
+ this.logger.error(RestClientI18n.connectionErrorMsg, responseCode,
"createFileNode");
String msg = RestClientI18n.createFileFailedMsg.text(file.getName(),
path, workspace.getName(), responseCode);
throw new RuntimeException(msg);
}
} finally {
if (connection != null) {
- this.logger.trace("createFileNode: leaving"); //$NON-NLS-1$
+ this.logger.trace("createFileNode: leaving");
connection.disconnect();
}
}
@@ -117,12 +117,12 @@
*/
private void createFolderNode( Workspace workspace,
String path ) throws Exception {
- this.logger.trace("createFolderNode: workspace={0}, path={1}",
workspace.getName(), path); //$NON-NLS-1$
+ this.logger.trace("createFolderNode: workspace={0}, path={1}",
workspace.getName(), path);
FolderNode folderNode = new FolderNode(workspace, path);
HttpClientConnection connection = connect(workspace.getServer(),
folderNode.getUrl(), RequestMethod.POST);
try {
- this.logger.trace("createFolderNode: create node={0}", folderNode);
//$NON-NLS-1$
+ this.logger.trace("createFolderNode: create node={0}",
folderNode);
connection.write(folderNode.getContent());
// make sure node was created
@@ -130,13 +130,13 @@
if (responseCode != HttpURLConnection.HTTP_CREATED) {
// node was not created
- this.logger.error(RestClientI18n.connectionErrorMsg, responseCode,
"createFolderNode"); //$NON-NLS-1$
+ this.logger.error(RestClientI18n.connectionErrorMsg, responseCode,
"createFolderNode");
String msg = RestClientI18n.createFolderFailedMsg.text(path,
workspace.getName(), responseCode);
throw new RuntimeException(msg);
}
} finally {
if (connection != null) {
- this.logger.trace("createFolderNode: leaving"); //$NON-NLS-1$
+ this.logger.trace("createFolderNode: leaving");
connection.disconnect();
}
}
@@ -151,7 +151,7 @@
*/
private void ensureFolderExists( Workspace workspace,
String folderPath ) throws Exception {
- this.logger.trace("ensureFolderExists: workspace={0}, path={1}",
workspace.getName(), folderPath); //$NON-NLS-1$
+ this.logger.trace("ensureFolderExists: workspace={0}, path={1}",
workspace.getName(), folderPath);
FolderNode folderNode = new FolderNode(workspace, folderPath);
if (!pathExists(workspace.getServer(), folderNode.getUrl())) {
@@ -189,8 +189,8 @@
* @see
org.jboss.dna.web.jcr.rest.client.IRestClient#getRepositories(org.jboss.dna.web.jcr.rest.client.domain.Server)
*/
public Collection<Repository> getRepositories( Server server ) throws Exception
{
- CheckArg.isNotNull(server, "server"); //$NON-NLS-1$
- this.logger.trace("getRepositories: server={0}", server);
//$NON-NLS-1$
+ CheckArg.isNotNull(server, "server");
+ this.logger.trace("getRepositories: server={0}", server);
ServerNode serverNode = new ServerNode(server);
HttpClientConnection connection = connect(server,
serverNode.getFindRepositoriesUrl(), RequestMethod.GET);
@@ -203,12 +203,12 @@
}
// not a good response code
- this.logger.error(RestClientI18n.connectionErrorMsg, responseCode,
"getRepositories"); //$NON-NLS-1$
+ this.logger.error(RestClientI18n.connectionErrorMsg, responseCode,
"getRepositories");
String msg = RestClientI18n.getRepositoriesFailedMsg.text(server.getName(),
responseCode);
throw new RuntimeException(msg);
} finally {
if (connection != null) {
- this.logger.trace("getRepositories: leaving"); //$NON-NLS-1$
+ this.logger.trace("getRepositories: leaving");
connection.disconnect();
}
}
@@ -223,9 +223,9 @@
public URL getUrl( File file,
String path,
Workspace workspace ) throws Exception {
- CheckArg.isNotNull(file, "file"); //$NON-NLS-1$
- CheckArg.isNotNull(path, "path"); //$NON-NLS-1$
- CheckArg.isNotNull(workspace, "workspace"); //$NON-NLS-1$
+ CheckArg.isNotNull(file, "file");
+ CheckArg.isNotNull(path, "path");
+ CheckArg.isNotNull(workspace, "workspace");
// can't be a directory
if (file.isDirectory()) {
@@ -241,8 +241,8 @@
* @see
org.jboss.dna.web.jcr.rest.client.IRestClient#getWorkspaces(org.jboss.dna.web.jcr.rest.client.domain.Repository)
*/
public Collection<Workspace> getWorkspaces( Repository repository ) throws
Exception {
- CheckArg.isNotNull(repository, "repository"); //$NON-NLS-1$
- this.logger.trace("getWorkspaces: repository={0}", repository);
//$NON-NLS-1$
+ CheckArg.isNotNull(repository, "repository");
+ this.logger.trace("getWorkspaces: repository={0}", repository);
RepositoryNode repositoryNode = new RepositoryNode(repository);
HttpClientConnection connection = connect(repository.getServer(),
repositoryNode.getUrl(), RequestMethod.GET);
@@ -255,14 +255,14 @@
}
// not a good response code
- this.logger.error(RestClientI18n.connectionErrorMsg, responseCode,
"getWorkspaces"); //$NON-NLS-1$
+ this.logger.error(RestClientI18n.connectionErrorMsg, responseCode,
"getWorkspaces");
String msg =
RestClientI18n.getWorkspacesFailedMsg.text(repository.getName(),
repository.getServer().getName(),
responseCode);
throw new RuntimeException(msg);
} finally {
if (connection != null) {
- this.logger.trace("getWorkspaces: leaving"); //$NON-NLS-1$
+ this.logger.trace("getWorkspaces: leaving");
connection.disconnect();
}
}
@@ -300,16 +300,16 @@
*/
private boolean pathExists( Server server,
URL url ) throws Exception {
- this.logger.trace("pathExists: url={0}", url); //$NON-NLS-1$
+ this.logger.trace("pathExists: url={0}", url);
HttpClientConnection connection = connect(server, url, RequestMethod.GET);
try {
int responseCode = connection.getResponseCode();
- this.logger.trace("pathExists: responseCode={0}", responseCode);
//$NON-NLS-1$
+ this.logger.trace("pathExists: responseCode={0}", responseCode);
return (responseCode == HttpURLConnection.HTTP_OK);
} finally {
if (connection != null) {
- this.logger.trace("pathExists: leaving"); //$NON-NLS-1$
+ this.logger.trace("pathExists: leaving");
connection.disconnect();
}
}
@@ -338,10 +338,10 @@
public Status publish( Workspace workspace,
String path,
File file ) {
- CheckArg.isNotNull(workspace, "workspace"); //$NON-NLS-1$
- CheckArg.isNotNull(path, "path"); //$NON-NLS-1$
- CheckArg.isNotNull(file, "file"); //$NON-NLS-1$
- this.logger.trace("publish: workspace={0}, path={1}, file={2}",
workspace.getName(), path, file.getAbsolutePath()); //$NON-NLS-1$
+ CheckArg.isNotNull(workspace, "workspace");
+ CheckArg.isNotNull(path, "path");
+ CheckArg.isNotNull(file, "file");
+ this.logger.trace("publish: workspace={0}, path={1}, file={2}",
workspace.getName(), path, file.getAbsolutePath());
try {
// first delete if file exists at that path
@@ -371,10 +371,10 @@
public Status unpublish( Workspace workspace,
String path,
File file ) {
- CheckArg.isNotNull(workspace, "workspace"); //$NON-NLS-1$
- CheckArg.isNotNull(path, "path"); //$NON-NLS-1$
- CheckArg.isNotNull(file, "file"); //$NON-NLS-1$
- this.logger.trace("unpublish: workspace={0}, path={1}, file={2}",
workspace.getName(), path, file.getAbsolutePath()); //$NON-NLS-1$
+ CheckArg.isNotNull(workspace, "workspace");
+ CheckArg.isNotNull(path, "path");
+ CheckArg.isNotNull(file, "file");
+ this.logger.trace("unpublish: workspace={0}, path={1}, file={2}",
workspace.getName(), path, file.getAbsolutePath());
HttpClientConnection connection = null;
@@ -382,7 +382,7 @@
FileNode fileNode = new FileNode(workspace, path, file);
connection = connect(workspace.getServer(), fileNode.getUrl(),
RequestMethod.DELETE);
int responseCode = connection.getResponseCode();
- this.logger.trace("responseCode={0}", responseCode); //$NON-NLS-1$
+ this.logger.trace("responseCode={0}", responseCode);
if (responseCode != HttpURLConnection.HTTP_NO_CONTENT) {
// check to see if the file was never published
@@ -392,7 +392,7 @@
}
// unexpected result
- this.logger.error(RestClientI18n.connectionErrorMsg, responseCode,
"unpublish"); //$NON-NLS-1$
+ this.logger.error(RestClientI18n.connectionErrorMsg, responseCode,
"unpublish");
String msg = RestClientI18n.unpublishFailedMsg.text(file.getName(),
workspace.getName(), path);
throw new RuntimeException(msg);
}
@@ -403,7 +403,7 @@
return new Status(Severity.ERROR, msg, e);
} finally {
if (connection != null) {
- this.logger.trace("unpublish: leaving"); //$NON-NLS-1$
+ this.logger.trace("unpublish: leaving");
connection.disconnect();
}
}
Modified:
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/json/JsonUtils.java
===================================================================
---
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/json/JsonUtils.java 2010-01-04
20:11:45 UTC (rev 1522)
+++
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/json/JsonUtils.java 2010-01-04
20:58:21 UTC (rev 1523)
@@ -43,7 +43,7 @@
/**
* The default character set being used.
*/
- private static final String DEFAULT_CHARSET = "UTF-8"; //$NON-NLS-1$ //
TODO need to property drive charset
+ private static final String DEFAULT_CHARSET = "UTF-8"; // TODO need to
property drive charset
//
===========================================================================================================================
// Class Methods
@@ -55,7 +55,7 @@
* @throws UnsupportedEncodingException if the charset is not supported
*/
public static String decode( String text ) throws UnsupportedEncodingException {
- CheckArg.isNotNull(text, "text"); //$NON-NLS-1$
+ CheckArg.isNotNull(text, "text");
return URLDecoder.decode(text, DEFAULT_CHARSET);
}
@@ -67,7 +67,7 @@
* @throws UnsupportedEncodingException if the charset is not supported
*/
public static String encode( String text ) throws UnsupportedEncodingException {
- CheckArg.isNotNull(text, "text"); //$NON-NLS-1$
+ CheckArg.isNotNull(text, "text");
// don't encode '/' as it needs to stay that way in the URL
StringBuilder encoded = new StringBuilder();
@@ -87,7 +87,7 @@
* @throws IOException if there is a problem reading from the connection
*/
public static String readInputStream( HttpURLConnection connection ) throws
IOException {
- CheckArg.isNotNull(connection, "connection"); //$NON-NLS-1$
+ CheckArg.isNotNull(connection, "connection");
InputStream stream = connection.getInputStream();
int bytesRead;
Modified:
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/json/RepositoryNode.java
===================================================================
---
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/json/RepositoryNode.java 2010-01-04
20:11:45 UTC (rev 1522)
+++
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/json/RepositoryNode.java 2010-01-04
20:58:21 UTC (rev 1523)
@@ -87,7 +87,7 @@
*/
@SuppressWarnings( "unchecked" )
public Collection<Workspace> getWorkspaces( String jsonResponse ) throws
Exception {
- CheckArg.isNotNull(jsonResponse, "jsonResponse"); //$NON-NLS-1$
+ CheckArg.isNotNull(jsonResponse, "jsonResponse");
Collection<Workspace> workspaces = new ArrayList<Workspace>();
JSONObject jsonObj = new JSONObject(jsonResponse);
Modified:
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/json/ServerNode.java
===================================================================
---
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/json/ServerNode.java 2010-01-04
20:11:45 UTC (rev 1522)
+++
trunk/web/dna-web-jcr-rest-client/src/main/java/org/jboss/dna/web/jcr/rest/client/json/ServerNode.java 2010-01-04
20:58:21 UTC (rev 1523)
@@ -81,13 +81,12 @@
StringBuilder url = new StringBuilder(this.server.getUrl());
// strip off last '/' if necessary
- if (url.lastIndexOf("/") == (url.length() - 1)) { //$NON-NLS-1$
+ if (url.lastIndexOf("/") == (url.length() - 1)) {
url.delete((url.length() - 1), (url.length() - 1));
}
- // append server context and insert user
+ // append server context
url.append(IJsonConstants.SERVER_CONTEXT);
- // url.insert(url.indexOf(":") + 1, this.server.getUser() +
'@'); //$NON-NLS-1$
return new URL(url.toString());
}
@@ -107,9 +106,9 @@
*/
@SuppressWarnings( "unchecked" )
public Collection<Repository> getRepositories( String jsonResponse ) throws
Exception {
- CheckArg.isNotNull(jsonResponse, "jsonResponse"); //$NON-NLS-1$
+ CheckArg.isNotNull(jsonResponse, "jsonResponse");
Collection<Repository> repositories = new ArrayList<Repository>();
- this.logger.trace("getRepositories:jsonResponse={0}", jsonResponse);
//$NON-NLS-1$
+ this.logger.trace("getRepositories:jsonResponse={0}", jsonResponse);
JSONObject jsonObj = new JSONObject(jsonResponse);
// keys are the repository names
@@ -117,7 +116,7 @@
String name = JsonUtils.decode(itr.next());
Repository repository = new Repository(name, this.server);
repositories.add(repository);
- this.logger.trace("getRepositories: adding repository={0}",
repository); //$NON-NLS-1$
+ this.logger.trace("getRepositories: adding repository={0}",
repository);
}
return repositories;
Modified:
trunk/web/dna-web-jcr-rest-client/src/test/java/org/jboss/dna/web/jcr/rest/client/StatusTest.java
===================================================================
---
trunk/web/dna-web-jcr-rest-client/src/test/java/org/jboss/dna/web/jcr/rest/client/StatusTest.java 2010-01-04
20:11:45 UTC (rev 1522)
+++
trunk/web/dna-web-jcr-rest-client/src/test/java/org/jboss/dna/web/jcr/rest/client/StatusTest.java 2010-01-04
20:58:21 UTC (rev 1523)
@@ -126,17 +126,17 @@
@Test
public void shouldBeAbleToPrintWithMessageAndNullException() {
- new Status(Severity.WARNING, "the message goes here", null).toString();
//$NON-NLS-1$
+ new Status(Severity.WARNING, "the message goes here",
null).toString();
}
@Test
public void shouldBeAbleToPrintWithMessageAndException() {
- new Status(Severity.WARNING, "the message goes here", new
RuntimeException("exception message")).toString(); //$NON-NLS-1$ //$NON-NLS-2$
+ new Status(Severity.WARNING, "the message goes here", new
RuntimeException("exception message")).toString();
}
@Test
public void shouldBeAbleToPrintWithNullMessageAndException() {
- new Status(Severity.WARNING, null, new RuntimeException("exception
message")).toString(); //$NON-NLS-1$
+ new Status(Severity.WARNING, null, new RuntimeException("exception
message")).toString();
}
@Test
Modified:
trunk/web/dna-web-jcr-rest-client/src/test/java/org/jboss/dna/web/jcr/rest/client/UtilsTest.java
===================================================================
---
trunk/web/dna-web-jcr-rest-client/src/test/java/org/jboss/dna/web/jcr/rest/client/UtilsTest.java 2010-01-04
20:11:45 UTC (rev 1522)
+++
trunk/web/dna-web-jcr-rest-client/src/test/java/org/jboss/dna/web/jcr/rest/client/UtilsTest.java 2010-01-04
20:58:21 UTC (rev 1523)
@@ -55,7 +55,7 @@
@Test
public void shouldHaveCorrectMimetypeForEclipseTextFiles() {
for (String extension : TEXT_EXTENSIONS) {
- String mimetype = Utils.getMimeType(new File('.' + extension));
//$NON-NLS-1$
+ String mimetype = Utils.getMimeType(new File('.' + extension));
assertThat(mimetype, is(TEXT_MIMETYPE));
}
}
Modified:
trunk/web/dna-web-jcr-rest-client/src/test/java/org/jboss/dna/web/jcr/rest/client/domain/RepositoryTest.java
===================================================================
---
trunk/web/dna-web-jcr-rest-client/src/test/java/org/jboss/dna/web/jcr/rest/client/domain/RepositoryTest.java 2010-01-04
20:11:45 UTC (rev 1522)
+++
trunk/web/dna-web-jcr-rest-client/src/test/java/org/jboss/dna/web/jcr/rest/client/domain/RepositoryTest.java 2010-01-04
20:58:21 UTC (rev 1523)
@@ -40,13 +40,13 @@
// Constants
//
===========================================================================================================================
- private static final String NAME1 = "name1"; //$NON-NLS-1$
+ private static final String NAME1 = "name1";
- private static final String NAME2 = "name2"; //$NON-NLS-1$
+ private static final String NAME2 = "name2";
- private static final Server SERVER1 = new Server("file:/tmp/temp.txt",
"user", "pswd"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ private static final Server SERVER1 = new Server("file:/tmp/temp.txt",
"user", "pswd");
- private static final Server SERVER2 = new Server("http:www.redhat.com",
"user", "pswd"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ private static final Server SERVER2 = new Server("http:www.redhat.com",
"user", "pswd");
private static final Repository REPOSITORY1 = new Repository(NAME1, SERVER1);
Modified:
trunk/web/dna-web-jcr-rest-client/src/test/java/org/jboss/dna/web/jcr/rest/client/domain/ServerTest.java
===================================================================
---
trunk/web/dna-web-jcr-rest-client/src/test/java/org/jboss/dna/web/jcr/rest/client/domain/ServerTest.java 2010-01-04
20:11:45 UTC (rev 1522)
+++
trunk/web/dna-web-jcr-rest-client/src/test/java/org/jboss/dna/web/jcr/rest/client/domain/ServerTest.java 2010-01-04
20:58:21 UTC (rev 1523)
@@ -40,14 +40,14 @@
// Constants
//
===========================================================================================================================
- private static final String URL1 = "file:/tmp/temp.txt"; //$NON-NLS-1$
- private static final String URL2 = "http:www.redhat.com"; //$NON-NLS-1$
+ private static final String URL1 = "file:/tmp/temp.txt";
+ private static final String URL2 = "http:www.redhat.com";
- private static final String USER1 = "user1"; //$NON-NLS-1$
- private static final String USER2 = "user2"; //$NON-NLS-1$
+ private static final String USER1 = "user1";
+ private static final String USER2 = "user2";
- private static final String PSWD1 = "pwsd1"; //$NON-NLS-1$
- private static final String PSWD2 = "pwsd2"; //$NON-NLS-1$
+ private static final String PSWD1 = "pwsd1";
+ private static final String PSWD2 = "pwsd2";
private static Server SERVER1 = new Server(URL1, USER1, PSWD1);
Modified:
trunk/web/dna-web-jcr-rest-client/src/test/java/org/jboss/dna/web/jcr/rest/client/domain/WorkspaceTest.java
===================================================================
---
trunk/web/dna-web-jcr-rest-client/src/test/java/org/jboss/dna/web/jcr/rest/client/domain/WorkspaceTest.java 2010-01-04
20:11:45 UTC (rev 1522)
+++
trunk/web/dna-web-jcr-rest-client/src/test/java/org/jboss/dna/web/jcr/rest/client/domain/WorkspaceTest.java 2010-01-04
20:58:21 UTC (rev 1523)
@@ -40,13 +40,13 @@
// Constants
//
===========================================================================================================================
- private static final String NAME1 = "name1"; //$NON-NLS-1$
+ private static final String NAME1 = "name1";
- private static final String NAME2 = "name2"; //$NON-NLS-1$
+ private static final String NAME2 = "name2";
- private static final Server SERVER1 = new Server("file:/tmp/temp.txt",
"user", "pswd"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ private static final Server SERVER1 = new Server("file:/tmp/temp.txt",
"user", "pswd");
- private static final Server SERVER2 = new Server("http:www.redhat.com",
"user", "pswd"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ private static final Server SERVER2 = new Server("http:www.redhat.com",
"user", "pswd");
private static final Repository REPOSITORY1 = new Repository(NAME1, SERVER1);
Modified:
trunk/web/dna-web-jcr-rest-client/src/test/java/org/jboss/dna/web/jcr/rest/client/json/JsonRestClientTest.java
===================================================================
---
trunk/web/dna-web-jcr-rest-client/src/test/java/org/jboss/dna/web/jcr/rest/client/json/JsonRestClientTest.java 2010-01-04
20:11:45 UTC (rev 1522)
+++
trunk/web/dna-web-jcr-rest-client/src/test/java/org/jboss/dna/web/jcr/rest/client/json/JsonRestClientTest.java 2010-01-04
20:58:21 UTC (rev 1523)
@@ -52,21 +52,21 @@
//
===========================================================================================================================
// user and password configured in pom
- private static final String PSWD = "password"; //$NON-NLS-1$
- private static final String USER = "dnauser"; //$NON-NLS-1$
+ private static final String PSWD = "password";
+ private static final String USER = "dnauser";
- private static final Server SERVER = new Server("http://localhost:8080",
USER, PSWD); //$NON-NLS-1$
- private static final String REPOSITORY_NAME = "dna:repository";
//$NON-NLS-1$
+ private static final Server SERVER = new Server("http://localhost:8080",
USER, PSWD);
+ private static final String REPOSITORY_NAME = "dna:repository";
private static final Repository REPOSITORY1 = new Repository(REPOSITORY_NAME,
SERVER);
- private static final String WORKSPACE_NAME = "default"; //$NON-NLS-1$
+ private static final String WORKSPACE_NAME = "default";
private static final Workspace WORKSPACE1 = new Workspace(WORKSPACE_NAME,
REPOSITORY1);
- private static final String WORKSPACE_PATH = "/myproject/myfolder/";
//$NON-NLS-1$
- private static final String FILE_PATH = WORKSPACE_PATH + "document.txt";
//$NON-NLS-1$
- private static final String BINARY_FILE_PATH = WORKSPACE_PATH +
"picture.jpg"; //$NON-NLS-1$
+ private static final String WORKSPACE_PATH = "/myproject/myfolder/";
+ private static final String FILE_PATH = WORKSPACE_PATH + "document.txt";
+ private static final String BINARY_FILE_PATH = WORKSPACE_PATH +
"picture.jpg";
- private static final String WORKSPACE_UNUSUALPATH = "/myproject/My.Test -
Folder/"; //$NON-NLS-1$
- private static final String FILE_UNUSUALPATH = WORKSPACE_UNUSUALPATH + "Test
File_.a-().txt"; //$NON-NLS-1$
+ private static final String WORKSPACE_UNUSUALPATH = "/myproject/My.Test -
Folder/";
+ private static final String FILE_UNUSUALPATH = WORKSPACE_UNUSUALPATH + "Test
File_.a-().txt";
//
===========================================================================================================================
// Fields
@@ -103,7 +103,7 @@
@Test
public void shouldNotUnpublishNonexistentFile() throws Exception {
- File file = new File("bogusfile"); //$NON-NLS-1$
+ File file = new File("bogusfile");
Status status = this.restClient.unpublish(WORKSPACE1, WORKSPACE_PATH, file);
if (status.isError()) {