Skip to content
This repository has been archived by the owner on Jun 18, 2024. It is now read-only.

Commit

Permalink
Merge pull request #51 from OfficeDev/dev
Browse files Browse the repository at this point in the history
Merging dev branch into integration branch
  • Loading branch information
Marcos Torres committed Nov 19, 2014
2 parents 2636264 + a2a72e7 commit e96fcde
Show file tree
Hide file tree
Showing 226 changed files with 6,834 additions and 6,038 deletions.
3 changes: 1 addition & 2 deletions sdk/directory-services/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ apply plugin: 'java'

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':odata-engine-interfaces')
compile project(':odata-engine-helpers')
compile project(':odata-engine-core')
}

apply from :'../java-libraries.gradle'
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
package com.microsoft.directoryservices.odata;

import com.google.common.util.concurrent.*;
import com.microsoft.services.odata.*;
import com.microsoft.services.odata.interfaces.*;
import com.microsoft.directoryservices.*;
import static com.microsoft.services.odata.Helpers.serializeToJsonByteArray;
import static com.microsoft.services.odata.Helpers.getFunctionParameters;
import static com.microsoft.services.odata.EntityFetcherHelper.addEntityResultCallback;
import static com.microsoft.services.odata.EntityFetcherHelper.addByteArrayResultCallback;



/**
Expand All @@ -34,10 +34,22 @@ public AppRoleAssignmentCollectionOperations(String urlComponent, ODataExecutabl
*
* @param name the name
* @param value the value
* @return the file attachment collection operations
* @return the collection operations
*/
public AppRoleAssignmentCollectionOperations addParameter(String name, Object value) {
addCustomParameter(name, value);
return this;
}
public AppRoleAssignmentCollectionOperations addParameter(String name, Object value) {
addCustomParameter(name, value);
return this;
}

/**
* Add header.
*
* @param name the name
* @param value the value
* @return the collection operations
*/
public AppRoleAssignmentCollectionOperations addHeader(String name, String value) {
addCustomHeader(name, value);
return this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,50 @@
package com.microsoft.directoryservices.odata;

import com.google.common.util.concurrent.*;
import com.microsoft.services.odata.*;
import com.microsoft.services.odata.Readable;
import com.microsoft.services.odata.interfaces.*;
import com.microsoft.directoryservices.*;
import com.microsoft.directoryservices.*;
import com.microsoft.directoryservices.*;

/**
* The type AppRoleAssignmentFetcher.
*/
public class AppRoleAssignmentFetcher extends ODataEntityFetcher<AppRoleAssignment,AppRoleAssignmentOperations> implements Readable<AppRoleAssignment> {
public class AppRoleAssignmentFetcher extends ODataEntityFetcher<AppRoleAssignment,AppRoleAssignmentOperations>
implements Readable<AppRoleAssignment> {

/**
* Instantiates a new AppRoleAssignmentFetcher.
*
* @param urlComponent the url component
* @param parent the parent
*/
public AppRoleAssignmentFetcher(String urlComponent, ODataExecutable parent) {
super(urlComponent, parent, AppRoleAssignment.class,AppRoleAssignmentOperations.class);
public AppRoleAssignmentFetcher(String urlComponent, ODataExecutable parent) {
super(urlComponent, parent, AppRoleAssignment.class, AppRoleAssignmentOperations.class);
}

}
/**
* Add parameter.
*
* @param name the name
* @param value the value
* @return the fetcher
*/
public AppRoleAssignmentFetcher addParameter(String name, Object value) {
addCustomParameter(name, value);
return this;
}

/**
* Add header.
*
* @param name the name
* @param value the value
* @return the fetcher
*/
public AppRoleAssignmentFetcher addHeader(String name, String value) {
addCustomHeader(name, value);
return this;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
package com.microsoft.directoryservices.odata;

import com.google.common.util.concurrent.*;
import com.microsoft.services.odata.*;
import com.microsoft.services.odata.interfaces.*;
import com.microsoft.directoryservices.*;
import static com.microsoft.services.odata.Helpers.serializeToJsonByteArray;
import static com.microsoft.services.odata.Helpers.getFunctionParameters;
import static com.microsoft.services.odata.EntityFetcherHelper.addEntityResultCallback;
import static com.microsoft.services.odata.EntityFetcherHelper.addByteArrayResultCallback;


/**
Expand All @@ -25,19 +24,32 @@ public class AppRoleAssignmentOperations extends DirectoryObjectOperations {
* @param urlComponent the url component
* @param parent the parent
*/
public AppRoleAssignmentOperations(String urlComponent, ODataExecutable parent) {
public AppRoleAssignmentOperations(String urlComponent, ODataExecutable parent) {
super(urlComponent, parent);
}

/**
* Add parameter.
*
* @param name the name
* @param value the value
* @return the approleassignment operations.
*/
public AppRoleAssignmentOperations addParameter(String name, Object value) {
addCustomParameter(name, value);
/**
* Add parameter.
*
* @param name the name
* @param value the value
* @return the operations
*/
public AppRoleAssignmentOperations addParameter(String name, Object value) {
addCustomParameter(name, value);
return this;
}

/**
* Add header.
*
* @param name the name
* @param value the value
* @return the operations
*/
public AppRoleAssignmentOperations addHeader(String name, String value) {
addCustomHeader(name, value);
return this;
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
package com.microsoft.directoryservices.odata;

import com.google.common.util.concurrent.*;
import com.microsoft.services.odata.*;
import com.microsoft.services.odata.interfaces.*;
import com.microsoft.directoryservices.*;
import static com.microsoft.services.odata.Helpers.serializeToJsonByteArray;
import static com.microsoft.services.odata.Helpers.getFunctionParameters;
import static com.microsoft.services.odata.EntityFetcherHelper.addEntityResultCallback;
import static com.microsoft.services.odata.EntityFetcherHelper.addByteArrayResultCallback;



/**
Expand All @@ -34,10 +34,22 @@ public ApplicationCollectionOperations(String urlComponent, ODataExecutable pare
*
* @param name the name
* @param value the value
* @return the file attachment collection operations
* @return the collection operations
*/
public ApplicationCollectionOperations addParameter(String name, Object value) {
addCustomParameter(name, value);
return this;
}
public ApplicationCollectionOperations addParameter(String name, Object value) {
addCustomParameter(name, value);
return this;
}

/**
* Add header.
*
* @param name the name
* @param value the value
* @return the collection operations
*/
public ApplicationCollectionOperations addHeader(String name, String value) {
addCustomHeader(name, value);
return this;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,67 @@
package com.microsoft.directoryservices.odata;

import com.google.common.util.concurrent.*;
import com.microsoft.services.odata.*;
import com.microsoft.services.odata.Readable;
import com.microsoft.services.odata.interfaces.*;
import com.microsoft.directoryservices.*;
import com.microsoft.directoryservices.*;
import com.microsoft.directoryservices.*;

/**
* The type ApplicationFetcher.
*/
public class ApplicationFetcher extends ODataEntityFetcher<Application,ApplicationOperations> implements Readable<Application> {
public class ApplicationFetcher extends ODataEntityFetcher<Application,ApplicationOperations>
implements Readable<Application> {

/**
* Instantiates a new ApplicationFetcher.
*
* @param urlComponent the url component
* @param parent the parent
*/
public ApplicationFetcher(String urlComponent, ODataExecutable parent) {
super(urlComponent, parent, Application.class,ApplicationOperations.class);
public ApplicationFetcher(String urlComponent, ODataExecutable parent) {
super(urlComponent, parent, Application.class, ApplicationOperations.class);
}

/**
/**
* Add parameter.
*
* @param name the name
* @param value the value
* @return the fetcher
*/
public ApplicationFetcher addParameter(String name, Object value) {
addCustomParameter(name, value);
return this;
}

/**
* Add header.
*
* @param name the name
* @param value the value
* @return the fetcher
*/
public ApplicationFetcher addHeader(String name, String value) {
addCustomHeader(name, value);
return this;
}

/**
* Gets extension properties.
*
* @return the extension properties
*/
public ODataCollectionFetcher<ExtensionProperty, ExtensionPropertyFetcher, ExtensionPropertyCollectionOperations> getextensionProperties() {
return new ODataCollectionFetcher<ExtensionProperty, ExtensionPropertyFetcher,ExtensionPropertyCollectionOperations>("extensionProperties", this, ExtensionProperty.class,ExtensionPropertyCollectionOperations.class);
public ODataCollectionFetcher<ExtensionProperty, ExtensionPropertyFetcher, ExtensionPropertyCollectionOperations> getextensionProperties() {
return new ODataCollectionFetcher<ExtensionProperty, ExtensionPropertyFetcher,ExtensionPropertyCollectionOperations>("extensionProperties", this, ExtensionProperty.class,ExtensionPropertyCollectionOperations.class);
}

/**
* Gets extension property.
*
* @return the extension property
*/
public ExtensionPropertyFetcher getextensionProperty(String id){
return new ODataCollectionFetcher<ExtensionProperty, ExtensionPropertyFetcher,ExtensionPropertyCollectionOperations>("extensionProperties", this, ExtensionProperty.class,ExtensionPropertyCollectionOperations.class).getById(id);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
package com.microsoft.directoryservices.odata;

import com.google.common.util.concurrent.*;
import com.microsoft.services.odata.*;
import com.microsoft.services.odata.interfaces.*;
import com.microsoft.directoryservices.*;
import static com.microsoft.services.odata.Helpers.serializeToJsonByteArray;
import static com.microsoft.services.odata.Helpers.getFunctionParameters;
import static com.microsoft.services.odata.EntityFetcherHelper.addEntityResultCallback;
import static com.microsoft.services.odata.EntityFetcherHelper.addByteArrayResultCallback;


/**
Expand All @@ -25,42 +24,54 @@ public class ApplicationOperations extends DirectoryObjectOperations {
* @param urlComponent the url component
* @param parent the parent
*/
public ApplicationOperations(String urlComponent, ODataExecutable parent) {
public ApplicationOperations(String urlComponent, ODataExecutable parent) {
super(urlComponent, parent);
}

/**
* Add parameter.
*
* @param name the name
* @param value the value
* @return the application operations.
*/
public ApplicationOperations addParameter(String name, Object value) {
addCustomParameter(name, value);
/**
* Add parameter.
*
* @param name the name
* @param value the value
* @return the operations
*/
public ApplicationOperations addParameter(String name, Object value) {
addCustomParameter(name, value);
return this;
}

/**
* Add header.
*
* @param name the name
* @param value the value
* @return the operations
*/
public ApplicationOperations addHeader(String name, String value) {
addCustomHeader(name, value);
return this;
}

}


/**
* restore listenable future.
* @param identifierUris the identifierUris
* @return the listenable future
*/
public ListenableFuture<Application> restore(java.util.List<String> identifierUris) {
final SettableFuture<Application> result = SettableFuture.create();
java.util.Map<String, Object> map = new java.util.HashMap<String, Object>();
map.put("identifierUris", identifierUris);

ODataURL url = getResolver().createODataURL();

String parameters = getFunctionParameters(map);
url.appendPathComponent("restore(" + parameters + ")");

ListenableFuture<byte[]> future = oDataExecute(url, serializeToJsonByteArray(map, getResolver()), HttpVerb.GET);

addEntityResultCallback(result, future, getResolver(), Application.class);
* @return the listenable future
*/
public ListenableFuture<Application> restore(java.util.List<String> identifierUris) {
final SettableFuture<Application> result = SettableFuture.create();
java.util.Map<String, Object> map = new java.util.HashMap<String, Object>();
map.put("identifierUris", identifierUris);

return result;
Request request = getResolver().createRequest();
request.setVerb(HttpVerb.POST);
request.setContent(serializeToJsonByteArray(map, getResolver()));
String parameters = getFunctionParameters(map);
request.getUrl().appendPathComponent("restore(" + parameters + ")");
ListenableFuture<ODataResponse> future = oDataExecute(request);
addEntityResultCallback(result, future, Application.class);

return result;
}
}
Loading

0 comments on commit e96fcde

Please sign in to comment.