Interface GenericPodioInterface
-
- All Known Implementing Classes:
GenericPodioImpl
public interface GenericPodioInterfaceThis is needed forGenericPodioInterfaceProxy.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intaddItem(AppWrapper item)<T extends AppWrapper>
List<T>filterAllItems(Class<T> app, com.podio.item.filter.ItemFilter filter)<T extends AppWrapper>
List<T>filterAllItems(Class<T> app, com.podio.item.filter.ItemFilter filter, boolean fetchCompleteItem)<T extends AppWrapper>
Stream<T>filterAllItemsAppWrapperStream(Class<T> app, com.podio.item.filter.ItemFilter filter, boolean fetchCompleteItems)Stream<com.podio.item.ItemBadge>filterAllItemsStream(int appId, com.podio.item.filter.ItemFilter filter)<T extends AppWrapper>
List<T>getAllItems(Class<T> app)Fetches all entries for an app from Podio.<T extends AppWrapper>
List<T>getAssociatedItems(Class<T> type, String fieldId, Integer podioId)This directly queries the given app (typeand field.<T extends AppWrapper>
TgetItemById(Class<T> type, Integer podioId)<T extends AppWrapper>
List<T>getItemsById(Class<T> type, List<Integer> podioIds)TODO: speed up by doing only one remote call!<T extends AppWrapper>
List<T>getItemsById(Class<T> type, List<Integer> podioIds, JProgressBar progressBar)TODO: speed up by doing only one remote call!<T extends AppWrapper>
TupdateItem(T item)Updates item with all fields.<T extends AppWrapper>
List<T>updateItems(Collection<T> items, JProgressBar progressBar)All items are assumed to be of the same type!<T extends AppWrapper>
List<T>updateItems(List<T> items)All items are assumed to be of the same type!intuploadFile(File file, int appId, String filename)
-
-
-
Method Detail
-
uploadFile
int uploadFile(File file, int appId, String filename)
- Parameters:
file-appId-filename-- Returns:
- fileId
-
addItem
int addItem(AppWrapper item)
- Parameters:
item- podioId will be set for this object- Returns:
- podioId of the created item
-
getItemById
<T extends AppWrapper> T getItemById(Class<T> type, Integer podioId)
-
getItemsById
<T extends AppWrapper> List<T> getItemsById(Class<T> type, List<Integer> podioIds)
TODO: speed up by doing only one remote call!- Parameters:
type-podioIds-- Returns:
-
getItemsById
<T extends AppWrapper> List<T> getItemsById(Class<T> type, List<Integer> podioIds, JProgressBar progressBar)
TODO: speed up by doing only one remote call!- Parameters:
type-podioIds-- Returns:
-
updateItem
<T extends AppWrapper> T updateItem(T item) throws PodioConflictException
Updates item with all fields. AssumesAppWrapper.getPodioId()is set.- Parameters:
item-- Returns:
- the updated item, this contains the new revision
- Throws:
PodioConflictException
-
updateItems
<T extends AppWrapper> List<T> updateItems(List<T> items) throws ParseException, PodioConflictException
All items are assumed to be of the same type!- Parameters:
items-- Returns:
- Throws:
ParseExceptionPodioConflictException- See Also:
updateItem(AppWrapper)
-
updateItems
<T extends AppWrapper> List<T> updateItems(Collection<T> items, JProgressBar progressBar) throws ParseException, PodioConflictException
All items are assumed to be of the same type!- Parameters:
items-progressBar-- Returns:
- Throws:
ParseExceptionPodioConflictException- See Also:
updateItem(AppWrapper)
-
getAllItems
<T extends AppWrapper> List<T> getAllItems(Class<T> app) throws InterruptedException, ExecutionException
Fetches all entries for an app from Podio. This is done parallel in chunks of 500 (which is the maximum). Note: this uses some undocumented URI ( ItemAPI#getItems() ) - the resulting items are missing e.g. the files attribute.- Parameters:
app- generated class of app- Returns:
- Throws:
InterruptedExceptionExecutionException
-
filterAllItems
<T extends AppWrapper> List<T> filterAllItems(Class<T> app, com.podio.item.filter.ItemFilter filter) throws InterruptedException, ExecutionException
-
filterAllItemsStream
Stream<com.podio.item.ItemBadge> filterAllItemsStream(int appId, com.podio.item.filter.ItemFilter filter)
-
filterAllItemsAppWrapperStream
<T extends AppWrapper> Stream<T> filterAllItemsAppWrapperStream(Class<T> app, com.podio.item.filter.ItemFilter filter, boolean fetchCompleteItems)
-
filterAllItems
<T extends AppWrapper> List<T> filterAllItems(Class<T> app, com.podio.item.filter.ItemFilter filter, boolean fetchCompleteItem)
-
getAssociatedItems
<T extends AppWrapper> List<T> getAssociatedItems(Class<T> type, String fieldId, Integer podioId) throws PodioApiWrapperException
This directly queries the given app (typeand field. For all references employItemAPI.getItemReference(int)(which will probably be slower, as it needs 2 remote calls).- Parameters:
type- app of items that are returnedfieldId- id of referencing field in apptype. Can be field id or field external id.podioId- referenced item (might not be in apptype!)- Returns:
- list of items from app
typethat referencepodioIdin fieldfieldId - Throws:
PodioApiWrapperException
-
-