/** * This code was auto-generated by a Codezu. * * Changes to this file may cause incorrect behavior and will be lost if * the code is regenerated. */ package com.mozu.api.resources.content; import com.mozu.api.ApiContext; import java.util.List; import java.util.ArrayList; import com.mozu.api.MozuClient; import com.mozu.api.MozuClientFactory; import com.mozu.api.MozuUrl; import com.mozu.api.Headers; import org.joda.time.DateTime; import com.mozu.api.AsyncCallback; import java.util.concurrent.CountDownLatch; import com.mozu.api.security.AuthTicket; import org.apache.commons.lang.StringUtils; /** <summary> * content/publishsets related resources. DOCUMENT_HERE * </summary> */ public class PublishSetSummaryResource { /// /// <see cref="Mozu.Api.ApiContext"/> /// private ApiContext _apiContext; public PublishSetSummaryResource(ApiContext apiContext) { _apiContext = apiContext; } /** * Returns a List of current Publishing sets with counts of drafts in each * <p><pre><code> * PublishSetSummary publishsetsummary = new PublishSetSummary(); * PublishSetSummaryPagedCollection publishSetSummaryPagedCollection = publishsetsummary.getPublishSets(); * </code></pre></p> * @return com.mozu.api.contracts.content.PublishSetSummaryPagedCollection * @see com.mozu.api.contracts.content.PublishSetSummaryPagedCollection */ public com.mozu.api.contracts.content.PublishSetSummaryPagedCollection getPublishSets() throws Exception { return getPublishSets( null, null, null); } /** * Returns a List of current Publishing sets with counts of drafts in each * <p><pre><code> * PublishSetSummary publishsetsummary = new PublishSetSummary(); * CountDownLatch latch = publishsetsummary.getPublishSets( callback ); * latch.await() * </code></pre></p> * @param callback callback handler for asynchronous operations * @return com.mozu.api.contracts.content.PublishSetSummaryPagedCollection * @see com.mozu.api.contracts.content.PublishSetSummaryPagedCollection */ public CountDownLatch getPublishSetsAsync( AsyncCallback<com.mozu.api.contracts.content.PublishSetSummaryPagedCollection> callback) throws Exception { return getPublishSetsAsync( null, null, null, callback); } /** * Returns a List of current Publishing sets with counts of drafts in each * <p><pre><code> * PublishSetSummary publishsetsummary = new PublishSetSummary(); * PublishSetSummaryPagedCollection publishSetSummaryPagedCollection = publishsetsummary.getPublishSets( pageSize, startIndex, responseFields); * </code></pre></p> * @param pageSize When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with this parameter set to 25, to get the 51st through the 75th items, set startIndex to 50. * @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss. * @param startIndex When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with pageSize set to 25, to get the 51st through the 75th items, set this parameter to 50. * @return com.mozu.api.contracts.content.PublishSetSummaryPagedCollection * @see com.mozu.api.contracts.content.PublishSetSummaryPagedCollection */ public com.mozu.api.contracts.content.PublishSetSummaryPagedCollection getPublishSets(Integer pageSize, Integer startIndex, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.content.PublishSetSummaryPagedCollection> client = com.mozu.api.clients.content.PublishSetSummaryClient.getPublishSetsClient( pageSize, startIndex, responseFields); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); } /** * Returns a List of current Publishing sets with counts of drafts in each * <p><pre><code> * PublishSetSummary publishsetsummary = new PublishSetSummary(); * CountDownLatch latch = publishsetsummary.getPublishSets( pageSize, startIndex, responseFields, callback ); * latch.await() * </code></pre></p> * @param pageSize When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with this parameter set to 25, to get the 51st through the 75th items, set startIndex to 50. * @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss. * @param startIndex When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with pageSize set to 25, to get the 51st through the 75th items, set this parameter to 50. * @param callback callback handler for asynchronous operations * @return com.mozu.api.contracts.content.PublishSetSummaryPagedCollection * @see com.mozu.api.contracts.content.PublishSetSummaryPagedCollection */ public CountDownLatch getPublishSetsAsync(Integer pageSize, Integer startIndex, String responseFields, AsyncCallback<com.mozu.api.contracts.content.PublishSetSummaryPagedCollection> callback) throws Exception { MozuClient<com.mozu.api.contracts.content.PublishSetSummaryPagedCollection> client = com.mozu.api.clients.content.PublishSetSummaryClient.getPublishSetsClient( pageSize, startIndex, responseFields); client.setContext(_apiContext); return client.executeRequest(callback); } /** * Retrieve a paged collection of publish set Items. * <p><pre><code> * PublishSetSummary publishsetsummary = new PublishSetSummary(); * DocumentDraftSummaryPagedCollection documentDraftSummaryPagedCollection = publishsetsummary.getPublishSetItems( code); * </code></pre></p> * @param code User-defined code that uniqely identifies the channel group. * @return com.mozu.api.contracts.content.DocumentDraftSummaryPagedCollection * @see com.mozu.api.contracts.content.DocumentDraftSummaryPagedCollection */ public com.mozu.api.contracts.content.DocumentDraftSummaryPagedCollection getPublishSetItems(String code) throws Exception { return getPublishSetItems( code, null, null, null, null, null); } /** * Retrieve a paged collection of publish set Items. * <p><pre><code> * PublishSetSummary publishsetsummary = new PublishSetSummary(); * CountDownLatch latch = publishsetsummary.getPublishSetItems( code, callback ); * latch.await() * </code></pre></p> * @param code User-defined code that uniqely identifies the channel group. * @param callback callback handler for asynchronous operations * @return com.mozu.api.contracts.content.DocumentDraftSummaryPagedCollection * @see com.mozu.api.contracts.content.DocumentDraftSummaryPagedCollection */ public CountDownLatch getPublishSetItemsAsync(String code, AsyncCallback<com.mozu.api.contracts.content.DocumentDraftSummaryPagedCollection> callback) throws Exception { return getPublishSetItemsAsync( code, null, null, null, null, null, callback); } /** * Retrieve a paged collection of publish set Items. * <p><pre><code> * PublishSetSummary publishsetsummary = new PublishSetSummary(); * DocumentDraftSummaryPagedCollection documentDraftSummaryPagedCollection = publishsetsummary.getPublishSetItems( code, pageSize, startIndex, sortBy, filter, responseFields); * </code></pre></p> * @param code User-defined code that uniqely identifies the channel group. * @param filter A set of filter expressions representing the search parameters for a query. This parameter is optional. Refer to [Sorting and Filtering](../../../../Developer/applications/sorting-filtering.htm) for a list of supported filters. * @param pageSize When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with this parameter set to 25, to get the 51st through the 75th items, set startIndex to 50. * @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss. * @param sortBy The element to sort the results by and the channel in which the results appear. Either ascending (a-z) or descending (z-a) channel. Optional. Refer to [Sorting and Filtering](../../../../Developer/applications/sorting-filtering.htm) for more information. * @param startIndex When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with pageSize set to 25, to get the 51st through the 75th items, set this parameter to 50. * @return com.mozu.api.contracts.content.DocumentDraftSummaryPagedCollection * @see com.mozu.api.contracts.content.DocumentDraftSummaryPagedCollection */ public com.mozu.api.contracts.content.DocumentDraftSummaryPagedCollection getPublishSetItems(String code, Integer pageSize, Integer startIndex, String sortBy, String filter, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.content.DocumentDraftSummaryPagedCollection> client = com.mozu.api.clients.content.PublishSetSummaryClient.getPublishSetItemsClient( code, pageSize, startIndex, sortBy, filter, responseFields); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); } /** * Retrieve a paged collection of publish set Items. * <p><pre><code> * PublishSetSummary publishsetsummary = new PublishSetSummary(); * CountDownLatch latch = publishsetsummary.getPublishSetItems( code, pageSize, startIndex, sortBy, filter, responseFields, callback ); * latch.await() * </code></pre></p> * @param code User-defined code that uniqely identifies the channel group. * @param filter A set of filter expressions representing the search parameters for a query. This parameter is optional. Refer to [Sorting and Filtering](../../../../Developer/applications/sorting-filtering.htm) for a list of supported filters. * @param pageSize When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with this parameter set to 25, to get the 51st through the 75th items, set startIndex to 50. * @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss. * @param sortBy The element to sort the results by and the channel in which the results appear. Either ascending (a-z) or descending (z-a) channel. Optional. Refer to [Sorting and Filtering](../../../../Developer/applications/sorting-filtering.htm) for more information. * @param startIndex When creating paged results from a query, this value indicates the zero-based offset in the complete result set where the returned entities begin. For example, with pageSize set to 25, to get the 51st through the 75th items, set this parameter to 50. * @param callback callback handler for asynchronous operations * @return com.mozu.api.contracts.content.DocumentDraftSummaryPagedCollection * @see com.mozu.api.contracts.content.DocumentDraftSummaryPagedCollection */ public CountDownLatch getPublishSetItemsAsync(String code, Integer pageSize, Integer startIndex, String sortBy, String filter, String responseFields, AsyncCallback<com.mozu.api.contracts.content.DocumentDraftSummaryPagedCollection> callback) throws Exception { MozuClient<com.mozu.api.contracts.content.DocumentDraftSummaryPagedCollection> client = com.mozu.api.clients.content.PublishSetSummaryClient.getPublishSetItemsClient( code, pageSize, startIndex, sortBy, filter, responseFields); client.setContext(_apiContext); return client.executeRequest(callback); } /** * Adds a set of documents by id to a publish set * <p><pre><code> * PublishSetSummary publishsetsummary = new PublishSetSummary(); * object object = publishsetsummary.deletePublishSet( code); * </code></pre></p> * @param code User-defined code that uniqely identifies the channel group. * @return object * @see object */ public Object deletePublishSet(String code) throws Exception { return deletePublishSet( code, null, null); } /** * Adds a set of documents by id to a publish set * <p><pre><code> * PublishSetSummary publishsetsummary = new PublishSetSummary(); * CountDownLatch latch = publishsetsummary.deletePublishSet( code, callback ); * latch.await() * </code></pre></p> * @param code User-defined code that uniqely identifies the channel group. * @param callback callback handler for asynchronous operations * @return object * @see object */ public CountDownLatch deletePublishSetAsync(String code, AsyncCallback<Object> callback) throws Exception { return deletePublishSetAsync( code, null, null, callback); } /** * Adds a set of documents by id to a publish set * <p><pre><code> * PublishSetSummary publishsetsummary = new PublishSetSummary(); * object object = publishsetsummary.deletePublishSet( code, shouldDiscard, responseFields); * </code></pre></p> * @param code User-defined code that uniqely identifies the channel group. * @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss. * @param shouldDiscard Specifies whether to discard the pending content changes assigned to the content publish set when the publish set is deleted. * @return object * @see object */ public Object deletePublishSet(String code, Boolean shouldDiscard, String responseFields) throws Exception { MozuClient<Object> client = com.mozu.api.clients.content.PublishSetSummaryClient.deletePublishSetClient( code, shouldDiscard, responseFields); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); } /** * Adds a set of documents by id to a publish set * <p><pre><code> * PublishSetSummary publishsetsummary = new PublishSetSummary(); * CountDownLatch latch = publishsetsummary.deletePublishSet( code, shouldDiscard, responseFields, callback ); * latch.await() * </code></pre></p> * @param code User-defined code that uniqely identifies the channel group. * @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss. * @param shouldDiscard Specifies whether to discard the pending content changes assigned to the content publish set when the publish set is deleted. * @param callback callback handler for asynchronous operations * @return object * @see object */ public CountDownLatch deletePublishSetAsync(String code, Boolean shouldDiscard, String responseFields, AsyncCallback<Object> callback) throws Exception { MozuClient<Object> client = com.mozu.api.clients.content.PublishSetSummaryClient.deletePublishSetClient( code, shouldDiscard, responseFields); client.setContext(_apiContext); return client.executeRequest(callback); } /** * Adds a set of documents by id to a publish set * <p><pre><code> * PublishSetSummary publishsetsummary = new PublishSetSummary(); * object object = publishsetsummary.addPublishSetItems( itemsToPublish, code); * </code></pre></p> * @param code User-defined code that uniqely identifies the channel group. * @param itemsToPublish Mozu.Content.Contracts.AddOrDeletePublishItem ApiType DOCUMENT_HERE * @return object * @see object * @see com.mozu.api.contracts.content.AddOrDeletePublishItem */ public Object addPublishSetItems(List<com.mozu.api.contracts.content.AddOrDeletePublishItem> itemsToPublish, String code) throws Exception { return addPublishSetItems( itemsToPublish, code, null); } /** * Adds a set of documents by id to a publish set * <p><pre><code> * PublishSetSummary publishsetsummary = new PublishSetSummary(); * CountDownLatch latch = publishsetsummary.addPublishSetItems( itemsToPublish, code, callback ); * latch.await() * </code></pre></p> * @param code User-defined code that uniqely identifies the channel group. * @param callback callback handler for asynchronous operations * @param itemsToPublish Mozu.Content.Contracts.AddOrDeletePublishItem ApiType DOCUMENT_HERE * @return object * @see object * @see com.mozu.api.contracts.content.AddOrDeletePublishItem */ public CountDownLatch addPublishSetItemsAsync(List<com.mozu.api.contracts.content.AddOrDeletePublishItem> itemsToPublish, String code, AsyncCallback<Object> callback) throws Exception { return addPublishSetItemsAsync( itemsToPublish, code, null, callback); } /** * Adds a set of documents by id to a publish set * <p><pre><code> * PublishSetSummary publishsetsummary = new PublishSetSummary(); * object object = publishsetsummary.addPublishSetItems( itemsToPublish, code, responseFields); * </code></pre></p> * @param code User-defined code that uniqely identifies the channel group. * @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss. * @param itemsToPublish Mozu.Content.Contracts.AddOrDeletePublishItem ApiType DOCUMENT_HERE * @return object * @see object * @see com.mozu.api.contracts.content.AddOrDeletePublishItem */ public Object addPublishSetItems(List<com.mozu.api.contracts.content.AddOrDeletePublishItem> itemsToPublish, String code, String responseFields) throws Exception { MozuClient<Object> client = com.mozu.api.clients.content.PublishSetSummaryClient.addPublishSetItemsClient( itemsToPublish, code, responseFields); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); } /** * Adds a set of documents by id to a publish set * <p><pre><code> * PublishSetSummary publishsetsummary = new PublishSetSummary(); * CountDownLatch latch = publishsetsummary.addPublishSetItems( itemsToPublish, code, responseFields, callback ); * latch.await() * </code></pre></p> * @param code User-defined code that uniqely identifies the channel group. * @param responseFields Filtering syntax appended to an API call to increase or decrease the amount of data returned inside a JSON object. This parameter should only be used to retrieve data. Attempting to update data using this parameter may cause data loss. * @param callback callback handler for asynchronous operations * @param itemsToPublish Mozu.Content.Contracts.AddOrDeletePublishItem ApiType DOCUMENT_HERE * @return object * @see object * @see com.mozu.api.contracts.content.AddOrDeletePublishItem */ public CountDownLatch addPublishSetItemsAsync(List<com.mozu.api.contracts.content.AddOrDeletePublishItem> itemsToPublish, String code, String responseFields, AsyncCallback<Object> callback) throws Exception { MozuClient<Object> client = com.mozu.api.clients.content.PublishSetSummaryClient.addPublishSetItemsClient( itemsToPublish, code, responseFields); client.setContext(_apiContext); return client.executeRequest(callback); } }