Search in sources :

Example 1 with ResourceRestClient

use of org.apache.syncope.client.console.rest.ResourceRestClient in project syncope by apache.

the class ConnObjectListViewPanel method reloadItems.

private List<ConnObjectTO> reloadItems(final String resource, final String anyType, final String cookie) {
    Pair<String, List<ConnObjectTO>> items = new ResourceRestClient().listConnObjects(resource, anyType, SIZE, cookie, new SortParam<>(ConnIdSpecialName.UID, true));
    nextPageCookie = items.getLeft();
    return items.getRight();
}
Also used : ResourceRestClient(org.apache.syncope.client.console.rest.ResourceRestClient) List(java.util.List)

Example 2 with ResourceRestClient

use of org.apache.syncope.client.console.rest.ResourceRestClient in project syncope by apache.

the class HistoryConfDetails method addCurrentInstanceConf.

@SuppressWarnings("unchecked")
private void addCurrentInstanceConf() {
    T conf = null;
    if (selectedHistoryConfTO instanceof ConnInstanceHistoryConfTO) {
        ConnInstanceTO current = new ConnectorRestClient().read(ConnInstanceHistoryConfTO.class.cast(selectedHistoryConfTO).getConnInstanceTO().getKey());
        conf = (T) new ConnInstanceHistoryConfTO();
        ((ConnInstanceHistoryConfTO) conf).setConnInstanceTO(current);
    } else if (selectedHistoryConfTO instanceof ResourceHistoryConfTO) {
        ResourceTO current = new ResourceRestClient().read(ResourceHistoryConfTO.class.cast(selectedHistoryConfTO).getResourceTO().getKey());
        conf = (T) new ResourceHistoryConfTO();
        ((ResourceHistoryConfTO) conf).setResourceTO(current);
    }
    if (conf != null) {
        conf.setCreator(selectedHistoryConfTO.getCreator());
        conf.setKey("current");
        availableHistoryConfTOs.add(conf);
    }
}
Also used : ConnectorRestClient(org.apache.syncope.client.console.rest.ConnectorRestClient) ResourceHistoryConfTO(org.apache.syncope.common.lib.to.ResourceHistoryConfTO) ResourceTO(org.apache.syncope.common.lib.to.ResourceTO) ConnInstanceTO(org.apache.syncope.common.lib.to.ConnInstanceTO) ConnInstanceHistoryConfTO(org.apache.syncope.common.lib.to.ConnInstanceHistoryConfTO) ResourceRestClient(org.apache.syncope.client.console.rest.ResourceRestClient)

Aggregations

ResourceRestClient (org.apache.syncope.client.console.rest.ResourceRestClient)2 List (java.util.List)1 ConnectorRestClient (org.apache.syncope.client.console.rest.ConnectorRestClient)1 ConnInstanceHistoryConfTO (org.apache.syncope.common.lib.to.ConnInstanceHistoryConfTO)1 ConnInstanceTO (org.apache.syncope.common.lib.to.ConnInstanceTO)1 ResourceHistoryConfTO (org.apache.syncope.common.lib.to.ResourceHistoryConfTO)1 ResourceTO (org.apache.syncope.common.lib.to.ResourceTO)1