mirror of
				https://github.com/owncloud/android-library.git
				synced 2025-10-31 02:17:41 +00:00 
			
		
		
		
	Fix some indentation issues
This commit is contained in:
		
							parent
							
								
									59ed7e42ec
								
							
						
					
					
						commit
						87a8b418de
					
				| @ -47,13 +47,13 @@ import static com.owncloud.android.lib.common.operations.RemoteOperationResult.R | ||||
| 
 | ||||
| /** | ||||
|  * Created by masensio on 08/10/2015. | ||||
|  * | ||||
|  * <p> | ||||
|  * Retrieves a list of sharees (possible targets of a share) from the ownCloud server. | ||||
|  * | ||||
|  * <p> | ||||
|  * Currently only handles users and groups. Users in other OC servers (federation) should be added later. | ||||
|  * | ||||
|  * <p> | ||||
|  * Depends on SHAREE API. {@See https://github.com/owncloud/documentation/issues/1626} | ||||
|  * | ||||
|  * <p> | ||||
|  * Syntax: | ||||
|  * Entry point: ocs/v2.php/apps/files_sharing/api/v1/sharees | ||||
|  * HTTP method: GET | ||||
| @ -62,7 +62,7 @@ import static com.owncloud.android.lib.common.operations.RemoteOperationResult.R | ||||
|  * url argument: search - string, optional | ||||
|  * url arguments: perPage - int, optional | ||||
|  * url arguments: page - int, optional | ||||
|  * | ||||
|  * <p> | ||||
|  * Status codes: | ||||
|  * 100 - successful | ||||
|  * | ||||
| @ -122,7 +122,7 @@ public class GetRemoteShareesOperation extends RemoteOperation<ArrayList<JSONObj | ||||
|     protected RemoteOperationResult<ArrayList<JSONObject>> run(OwnCloudClient client) { | ||||
|         RemoteOperationResult<ArrayList<JSONObject>> result; | ||||
| 
 | ||||
|         try{ | ||||
|         try { | ||||
|             Uri requestUri = client.getBaseUri(); | ||||
|             Uri.Builder uriBuilder = requestUri.buildUpon() | ||||
|                     .appendEncodedPath(OCS_ROUTE) | ||||
| @ -139,7 +139,7 @@ public class GetRemoteShareesOperation extends RemoteOperation<ArrayList<JSONObj | ||||
|             int status = client.executeHttpMethod(getMethod); | ||||
|             String response = getMethod.getResponseBodyAsString(); | ||||
| 
 | ||||
|             if(isSuccess(status)) { | ||||
|             if (isSuccess(status)) { | ||||
|                 Log_OC.d(TAG, "Successful response: " + response); | ||||
| 
 | ||||
|                 // Parse the response | ||||
| @ -163,8 +163,8 @@ public class GetRemoteShareesOperation extends RemoteOperation<ArrayList<JSONObj | ||||
|                 }; | ||||
| 
 | ||||
|                 ArrayList<JSONObject> data = new ArrayList<>(); // For result data | ||||
|                 for (int i=0; i<6; i++) { | ||||
|                     for(int j=0; j< jsonResults[i].length(); j++){ | ||||
|                 for (int i = 0; i < 6; i++) { | ||||
|                     for (int j = 0; j < jsonResults[i].length(); j++) { | ||||
|                         JSONObject jsonResult = jsonResults[i].getJSONObject(j); | ||||
|                         data.add(jsonResult); | ||||
|                         Log_OC.d(TAG, "*** Added item: " + jsonResult.getString(PROPERTY_LABEL)); | ||||
| @ -174,7 +174,7 @@ public class GetRemoteShareesOperation extends RemoteOperation<ArrayList<JSONObj | ||||
|                 result = new RemoteOperationResult<>(OK); | ||||
|                 result.setData(data); | ||||
| 
 | ||||
|                 Log_OC.d(TAG, "*** Get Users or groups completed " ); | ||||
|                 Log_OC.d(TAG, "*** Get Users or groups completed "); | ||||
| 
 | ||||
|             } else { | ||||
|                 result = new RemoteOperationResult<>(getMethod); | ||||
|  | ||||
| @ -39,6 +39,7 @@ import java.util.ArrayList; | ||||
| 
 | ||||
| /** | ||||
|  * Parser for Share API Response | ||||
|  * | ||||
|  * @author masensio | ||||
|  * @author David González Verdugo | ||||
|  */ | ||||
| @ -139,6 +140,7 @@ public class ShareXMLParser { | ||||
| 
 | ||||
|     /** | ||||
|      * Parse is as response of Share API | ||||
|      * | ||||
|      * @param is | ||||
|      * @return List of ShareRemoteFiles | ||||
|      * @throws XmlPullParserException | ||||
| @ -165,15 +167,16 @@ public class ShareXMLParser { | ||||
| 
 | ||||
|     /** | ||||
|      * Parse OCS node | ||||
|      * | ||||
|      * @param parser | ||||
|      * @return List of ShareRemoteFiles | ||||
|      * @throws XmlPullParserException | ||||
|      * @throws IOException | ||||
|      */ | ||||
| 	private ArrayList<OCShare> readOCS (XmlPullParser parser) throws XmlPullParserException, | ||||
|     private ArrayList<OCShare> readOCS(XmlPullParser parser) throws XmlPullParserException, | ||||
|             IOException { | ||||
|         ArrayList<OCShare> shares = new ArrayList<>(); | ||||
| 		parser.require(XmlPullParser.START_TAG,  ns , NODE_OCS); | ||||
|         parser.require(XmlPullParser.START_TAG, ns, NODE_OCS); | ||||
|         while (parser.next() != XmlPullParser.END_TAG) { | ||||
|             if (parser.getEventType() != XmlPullParser.START_TAG) { | ||||
|                 continue; | ||||
| @ -194,6 +197,7 @@ public class ShareXMLParser { | ||||
| 
 | ||||
|     /** | ||||
|      * Parse Meta node | ||||
|      * | ||||
|      * @param parser | ||||
|      * @throws XmlPullParserException | ||||
|      * @throws IOException | ||||
| @ -225,6 +229,7 @@ public class ShareXMLParser { | ||||
| 
 | ||||
|     /** | ||||
|      * Parse Data node | ||||
|      * | ||||
|      * @param parser | ||||
|      * @return | ||||
|      * @throws XmlPullParserException | ||||
| @ -279,6 +284,7 @@ public class ShareXMLParser { | ||||
| 
 | ||||
|     /** | ||||
|      * Parse Element node | ||||
|      * | ||||
|      * @param parser | ||||
|      * @return | ||||
|      * @throws XmlPullParserException | ||||
| @ -387,14 +393,15 @@ public class ShareXMLParser { | ||||
| 
 | ||||
|     /** | ||||
|      * Parse a node, to obtain its text. Needs readText method | ||||
|      * | ||||
|      * @param parser | ||||
|      * @param node | ||||
|      * @return Text of the node | ||||
|      * @throws XmlPullParserException | ||||
|      * @throws IOException | ||||
|      */ | ||||
| 	private String readNode (XmlPullParser parser, String node) throws XmlPullParserException, | ||||
| 			IOException{ | ||||
|     private String readNode(XmlPullParser parser, String node) throws XmlPullParserException, | ||||
|             IOException { | ||||
|         parser.require(XmlPullParser.START_TAG, ns, node); | ||||
|         String value = readText(parser); | ||||
|         //Log_OC.d(TAG, "node= " + node + ", value= " + value); | ||||
| @ -404,6 +411,7 @@ public class ShareXMLParser { | ||||
| 
 | ||||
|     /** | ||||
|      * Read the text from a node | ||||
|      * | ||||
|      * @param parser | ||||
|      * @return Text of the node | ||||
|      * @throws IOException | ||||
| @ -420,6 +428,7 @@ public class ShareXMLParser { | ||||
| 
 | ||||
|     /** | ||||
|      * Skip tags in parser procedure | ||||
|      * | ||||
|      * @param parser | ||||
|      * @throws XmlPullParserException | ||||
|      * @throws IOException | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user