Commits

Anonymous committed 74a7306

added more comments

Comments (0)

Files changed (1)

src/main/java/urbanairship/UrbanAirShipSimpleClient.java

 
 import urbanairship.UrbanAirshipClient;
 
-//TODO: Comment methods
-
 /***
  * The following class is used by the sample package to create a UrbanAirship client instance
  * @author ferron
+ * @version 0.2
+ * @since 6/22/2011
+ * @see {@link UrbanAirshipClient}
  *
  */
 public class UrbanAirShipSimpleClient extends UrbanAirshipClient {
 	
 	private static ArrayList<String> dToken = new ArrayList<String>(), apiD = new ArrayList<String>();
 
+	/**
+	 * The following constructor is a wrapper around the super {@link UrbanAirshipClient#UrbanAirshipClient(String, String)}
+	 * @param app_key - application key (This is the primary identifier for this application. You’ll use it as the username when using the API, and you’ll give it to the support staff if you need help to identify your application.)
+	 * @param master_key  - master key (The master secret can do anything the API can do, including sending notifications to your users. Always carefully guard this secret, and never embed it in your client application.)
+	 * @see Please see the following link for more information on app_key & master_key {@link http://urbanairship.com/docs/getting_started_ios_push.html} 
+	 */
 	public UrbanAirShipSimpleClient(String app_key, String master_key) {
 		super(app_key, master_key);
 	}
 	
+	/**
+	 * The following constructor is a wrapper around the super {@link UrbanAirshipClient#UrbanAirshipClient(String, String, String)}
+	 * @param app_key - application key (This is the primary identifier for this application. You’ll use it as the username when using the API, and you’ll give it to the support staff if you need help to identify your application.)
+	 * @param master_key  - master key (The master secret can do anything the API can do, including sending notifications to your users. Always carefully guard this secret, and never embed it in your client application.)
+	 * @param hostname - urbanairship api host address 
+	 * @see Please see the following link for more information on app_key & master_key {@link http://urbanairship.com/docs/getting_started_ios_push.html}
+	 */
 	public UrbanAirShipSimpleClient(String app_key, String master_key, String hostname) {
 		super(app_key, master_key,hostname);
 	}
 	/**
 	 * The following function converts an array to an ArrayList
 	 * @param myArray
-	 * @return
+	 * @return list of {@link String}
 	 */
 	public List<String> convertArrayToArrayList(String[] myArray) {
 		   List <String> myArrayList = new ArrayList <String>();
 	}
 	
 	/**
-	 * The following function adds a devices to a specific array
+	 * The following function adds an array devices and sort them to their respective array container
 	 * @param device
 	 */
 	public void addDevice(String [] device) {
 	}
 	
 	/**
+	 * The following function adds list devices and sort them to their respective array container
+	 * @param device
+	 */
+	public void addDevice(List<String> device) {
+		tokenSort(device);
+	}
+	
+	/**
 	 * The following function send notifications to all devices
 	 * @param alert
 	 */
 		if(droid == null || iOs == null) 
 			return null;
 		
+		//merge the droid properties with the iOS push object
 		iOs.setApids(droid.getApids());
 		iOs.setAndroid(droid.getAndroid());
 		return iOs;
 	/**
 	 * Generic push object
 	 * @param alert
-	 * @return
+	 * @return push notification object
 	 */
 	private Push createPush(String alert) {
 		APS aps = new APS();