/** * 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; import com.mozu.api.DataViewMode; /** <summary> * Use the Document List Types resource to manage the types of document lists in your site's document hierarchy. The type denotes a content type for that list of folders, sub-folders, and documents such as `web_pages`. * </summary> */ public class DocumentListTypeResource { /// /// <see cref="Mozu.Api.ApiContext"/> /// private ApiContext _apiContext; private DataViewMode _dataViewMode; public DocumentListTypeResource(ApiContext apiContext) { _apiContext = apiContext; _dataViewMode = DataViewMode.Live; } public DocumentListTypeResource(ApiContext apiContext, DataViewMode dataViewMode) { _apiContext = apiContext; _dataViewMode = dataViewMode; } /** * content-documentlistTypes Get GetDocumentListTypes description DOCUMENT_HERE * <p><pre><code> * DocumentListType documentlisttype = new DocumentListType(); * DocumentListTypeCollection documentListTypeCollection = documentlisttype.getDocumentListTypes(); * </code></pre></p> * @return com.mozu.api.contracts.content.DocumentListTypeCollection * @see com.mozu.api.contracts.content.DocumentListTypeCollection */ public com.mozu.api.contracts.content.DocumentListTypeCollection getDocumentListTypes() throws Exception { return getDocumentListTypes( null, null, null); } /** * content-documentlistTypes Get GetDocumentListTypes description DOCUMENT_HERE * <p><pre><code> * DocumentListType documentlisttype = new DocumentListType(); * CountDownLatch latch = documentlisttype.getDocumentListTypes( callback ); * latch.await() * </code></pre></p> * @param callback callback handler for asynchronous operations * @return com.mozu.api.contracts.content.DocumentListTypeCollection * @see com.mozu.api.contracts.content.DocumentListTypeCollection */ public CountDownLatch getDocumentListTypesAsync( AsyncCallback<com.mozu.api.contracts.content.DocumentListTypeCollection> callback) throws Exception { return getDocumentListTypesAsync( null, null, null, callback); } /** * content-documentlistTypes Get GetDocumentListTypes description DOCUMENT_HERE * <p><pre><code> * DocumentListType documentlisttype = new DocumentListType(); * DocumentListTypeCollection documentListTypeCollection = documentlisttype.getDocumentListTypes( 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.DocumentListTypeCollection * @see com.mozu.api.contracts.content.DocumentListTypeCollection */ public com.mozu.api.contracts.content.DocumentListTypeCollection getDocumentListTypes(Integer pageSize, Integer startIndex, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.content.DocumentListTypeCollection> client = com.mozu.api.clients.content.DocumentListTypeClient.getDocumentListTypesClient(_dataViewMode, pageSize, startIndex, responseFields); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); } /** * content-documentlistTypes Get GetDocumentListTypes description DOCUMENT_HERE * <p><pre><code> * DocumentListType documentlisttype = new DocumentListType(); * CountDownLatch latch = documentlisttype.getDocumentListTypes( 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.DocumentListTypeCollection * @see com.mozu.api.contracts.content.DocumentListTypeCollection */ public CountDownLatch getDocumentListTypesAsync(Integer pageSize, Integer startIndex, String responseFields, AsyncCallback<com.mozu.api.contracts.content.DocumentListTypeCollection> callback) throws Exception { MozuClient<com.mozu.api.contracts.content.DocumentListTypeCollection> client = com.mozu.api.clients.content.DocumentListTypeClient.getDocumentListTypesClient(_dataViewMode, pageSize, startIndex, responseFields); client.setContext(_apiContext); return client.executeRequest(callback); } /** * content-documentlistTypes Get GetDocumentListType description DOCUMENT_HERE * <p><pre><code> * DocumentListType documentlisttype = new DocumentListType(); * DocumentListType documentListType = documentlisttype.getDocumentListType( documentListTypeFQN); * </code></pre></p> * @param documentListTypeFQN * @return com.mozu.api.contracts.content.DocumentListType * @see com.mozu.api.contracts.content.DocumentListType */ public com.mozu.api.contracts.content.DocumentListType getDocumentListType(String documentListTypeFQN) throws Exception { return getDocumentListType( documentListTypeFQN, null); } /** * content-documentlistTypes Get GetDocumentListType description DOCUMENT_HERE * <p><pre><code> * DocumentListType documentlisttype = new DocumentListType(); * CountDownLatch latch = documentlisttype.getDocumentListType( documentListTypeFQN, callback ); * latch.await() * </code></pre></p> * @param documentListTypeFQN * @param callback callback handler for asynchronous operations * @return com.mozu.api.contracts.content.DocumentListType * @see com.mozu.api.contracts.content.DocumentListType */ public CountDownLatch getDocumentListTypeAsync(String documentListTypeFQN, AsyncCallback<com.mozu.api.contracts.content.DocumentListType> callback) throws Exception { return getDocumentListTypeAsync( documentListTypeFQN, null, callback); } /** * content-documentlistTypes Get GetDocumentListType description DOCUMENT_HERE * <p><pre><code> * DocumentListType documentlisttype = new DocumentListType(); * DocumentListType documentListType = documentlisttype.getDocumentListType( documentListTypeFQN, responseFields); * </code></pre></p> * @param documentListTypeFQN * @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. * @return com.mozu.api.contracts.content.DocumentListType * @see com.mozu.api.contracts.content.DocumentListType */ public com.mozu.api.contracts.content.DocumentListType getDocumentListType(String documentListTypeFQN, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.content.DocumentListType> client = com.mozu.api.clients.content.DocumentListTypeClient.getDocumentListTypeClient(_dataViewMode, documentListTypeFQN, responseFields); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); } /** * content-documentlistTypes Get GetDocumentListType description DOCUMENT_HERE * <p><pre><code> * DocumentListType documentlisttype = new DocumentListType(); * CountDownLatch latch = documentlisttype.getDocumentListType( documentListTypeFQN, responseFields, callback ); * latch.await() * </code></pre></p> * @param documentListTypeFQN * @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 * @return com.mozu.api.contracts.content.DocumentListType * @see com.mozu.api.contracts.content.DocumentListType */ public CountDownLatch getDocumentListTypeAsync(String documentListTypeFQN, String responseFields, AsyncCallback<com.mozu.api.contracts.content.DocumentListType> callback) throws Exception { MozuClient<com.mozu.api.contracts.content.DocumentListType> client = com.mozu.api.clients.content.DocumentListTypeClient.getDocumentListTypeClient(_dataViewMode, documentListTypeFQN, responseFields); client.setContext(_apiContext); return client.executeRequest(callback); } /** * Creates a new documentListType * <p><pre><code> * DocumentListType documentlisttype = new DocumentListType(); * DocumentListType documentListType = documentlisttype.createDocumentListType( list); * </code></pre></p> * @param list Properties for the document list type. Document lists contain documents with an associated document type, such as web pages. * @return com.mozu.api.contracts.content.DocumentListType * @see com.mozu.api.contracts.content.DocumentListType * @see com.mozu.api.contracts.content.DocumentListType */ public com.mozu.api.contracts.content.DocumentListType createDocumentListType(com.mozu.api.contracts.content.DocumentListType list) throws Exception { return createDocumentListType( list, null); } /** * Creates a new documentListType * <p><pre><code> * DocumentListType documentlisttype = new DocumentListType(); * CountDownLatch latch = documentlisttype.createDocumentListType( list, callback ); * latch.await() * </code></pre></p> * @param callback callback handler for asynchronous operations * @param list Properties for the document list type. Document lists contain documents with an associated document type, such as web pages. * @return com.mozu.api.contracts.content.DocumentListType * @see com.mozu.api.contracts.content.DocumentListType * @see com.mozu.api.contracts.content.DocumentListType */ public CountDownLatch createDocumentListTypeAsync(com.mozu.api.contracts.content.DocumentListType list, AsyncCallback<com.mozu.api.contracts.content.DocumentListType> callback) throws Exception { return createDocumentListTypeAsync( list, null, callback); } /** * Creates a new documentListType * <p><pre><code> * DocumentListType documentlisttype = new DocumentListType(); * DocumentListType documentListType = documentlisttype.createDocumentListType( list, responseFields); * </code></pre></p> * @param responseFields Use this field to include those fields which are not included by default. * @param list Properties for the document list type. Document lists contain documents with an associated document type, such as web pages. * @return com.mozu.api.contracts.content.DocumentListType * @see com.mozu.api.contracts.content.DocumentListType * @see com.mozu.api.contracts.content.DocumentListType */ public com.mozu.api.contracts.content.DocumentListType createDocumentListType(com.mozu.api.contracts.content.DocumentListType list, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.content.DocumentListType> client = com.mozu.api.clients.content.DocumentListTypeClient.createDocumentListTypeClient(_dataViewMode, list, responseFields); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); } /** * Creates a new documentListType * <p><pre><code> * DocumentListType documentlisttype = new DocumentListType(); * CountDownLatch latch = documentlisttype.createDocumentListType( list, responseFields, callback ); * latch.await() * </code></pre></p> * @param responseFields Use this field to include those fields which are not included by default. * @param callback callback handler for asynchronous operations * @param list Properties for the document list type. Document lists contain documents with an associated document type, such as web pages. * @return com.mozu.api.contracts.content.DocumentListType * @see com.mozu.api.contracts.content.DocumentListType * @see com.mozu.api.contracts.content.DocumentListType */ public CountDownLatch createDocumentListTypeAsync(com.mozu.api.contracts.content.DocumentListType list, String responseFields, AsyncCallback<com.mozu.api.contracts.content.DocumentListType> callback) throws Exception { MozuClient<com.mozu.api.contracts.content.DocumentListType> client = com.mozu.api.clients.content.DocumentListTypeClient.createDocumentListTypeClient(_dataViewMode, list, responseFields); client.setContext(_apiContext); return client.executeRequest(callback); } /** * Updates a DocumentListType * <p><pre><code> * DocumentListType documentlisttype = new DocumentListType(); * DocumentListType documentListType = documentlisttype.updateDocumentListType( list, documentListTypeFQN); * </code></pre></p> * @param documentListTypeFQN * @param list Properties for the document list type. Document lists contain documents with an associated document type, such as web pages. * @return com.mozu.api.contracts.content.DocumentListType * @see com.mozu.api.contracts.content.DocumentListType * @see com.mozu.api.contracts.content.DocumentListType */ public com.mozu.api.contracts.content.DocumentListType updateDocumentListType(com.mozu.api.contracts.content.DocumentListType list, String documentListTypeFQN) throws Exception { return updateDocumentListType( list, documentListTypeFQN, null); } /** * Updates a DocumentListType * <p><pre><code> * DocumentListType documentlisttype = new DocumentListType(); * CountDownLatch latch = documentlisttype.updateDocumentListType( list, documentListTypeFQN, callback ); * latch.await() * </code></pre></p> * @param documentListTypeFQN * @param callback callback handler for asynchronous operations * @param list Properties for the document list type. Document lists contain documents with an associated document type, such as web pages. * @return com.mozu.api.contracts.content.DocumentListType * @see com.mozu.api.contracts.content.DocumentListType * @see com.mozu.api.contracts.content.DocumentListType */ public CountDownLatch updateDocumentListTypeAsync(com.mozu.api.contracts.content.DocumentListType list, String documentListTypeFQN, AsyncCallback<com.mozu.api.contracts.content.DocumentListType> callback) throws Exception { return updateDocumentListTypeAsync( list, documentListTypeFQN, null, callback); } /** * Updates a DocumentListType * <p><pre><code> * DocumentListType documentlisttype = new DocumentListType(); * DocumentListType documentListType = documentlisttype.updateDocumentListType( list, documentListTypeFQN, responseFields); * </code></pre></p> * @param documentListTypeFQN * @param responseFields Use this field to include those fields which are not included by default. * @param list Properties for the document list type. Document lists contain documents with an associated document type, such as web pages. * @return com.mozu.api.contracts.content.DocumentListType * @see com.mozu.api.contracts.content.DocumentListType * @see com.mozu.api.contracts.content.DocumentListType */ public com.mozu.api.contracts.content.DocumentListType updateDocumentListType(com.mozu.api.contracts.content.DocumentListType list, String documentListTypeFQN, String responseFields) throws Exception { MozuClient<com.mozu.api.contracts.content.DocumentListType> client = com.mozu.api.clients.content.DocumentListTypeClient.updateDocumentListTypeClient( list, documentListTypeFQN, responseFields); client.setContext(_apiContext); client.executeRequest(); return client.getResult(); } /** * Updates a DocumentListType * <p><pre><code> * DocumentListType documentlisttype = new DocumentListType(); * CountDownLatch latch = documentlisttype.updateDocumentListType( list, documentListTypeFQN, responseFields, callback ); * latch.await() * </code></pre></p> * @param documentListTypeFQN * @param responseFields Use this field to include those fields which are not included by default. * @param callback callback handler for asynchronous operations * @param list Properties for the document list type. Document lists contain documents with an associated document type, such as web pages. * @return com.mozu.api.contracts.content.DocumentListType * @see com.mozu.api.contracts.content.DocumentListType * @see com.mozu.api.contracts.content.DocumentListType */ public CountDownLatch updateDocumentListTypeAsync(com.mozu.api.contracts.content.DocumentListType list, String documentListTypeFQN, String responseFields, AsyncCallback<com.mozu.api.contracts.content.DocumentListType> callback) throws Exception { MozuClient<com.mozu.api.contracts.content.DocumentListType> client = com.mozu.api.clients.content.DocumentListTypeClient.updateDocumentListTypeClient( list, documentListTypeFQN, responseFields); client.setContext(_apiContext); return client.executeRequest(callback); } }