use of com.adobe.granite.ui.components.ds.SimpleDataSource in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class OptionsImplTest method setUpMockDataSource.
private void setUpMockDataSource() {
Resource dataSourceResource = context.resourceResolver().getResource(CONTENT_ROOT + "/dataDatasource/datasource/items");
SimpleDataSource dataSource = new SimpleDataSource(dataSourceResource.listChildren());
context.request().setAttribute(DataSource.class.getName(), dataSource);
}
use of com.adobe.granite.ui.components.ds.SimpleDataSource in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class AllowedTitleSizesDataSourceServlet method doGet.
@Override
protected void doGet(@Nonnull SlingHttpServletRequest request, @Nonnull SlingHttpServletResponse response) throws ServletException, IOException {
SimpleDataSource allowedTypesDataSource = new SimpleDataSource(getAllowedTypes(request).iterator());
request.setAttribute(DataSource.class.getName(), allowedTypesDataSource);
}
use of com.adobe.granite.ui.components.ds.SimpleDataSource in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class FormActionTypeDataSourceServlet method doGet.
@Override
protected void doGet(@Nonnull SlingHttpServletRequest request, @Nonnull SlingHttpServletResponse response) throws ServletException, IOException {
SimpleDataSource actionTypeDataSource = new SimpleDataSource(getActionTypeResources(request.getResourceResolver()).iterator());
request.setAttribute(DataSource.class.getName(), actionTypeDataSource);
}
use of com.adobe.granite.ui.components.ds.SimpleDataSource in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class FormActionTypeSettingsDataSourceServlet method doGet.
@Override
protected void doGet(@Nonnull SlingHttpServletRequest request, @Nonnull SlingHttpServletResponse response) throws ServletException, IOException {
SimpleDataSource actionTypeSettingsDataSource = new SimpleDataSource(getSettingsDialogs(request.getResourceResolver()).iterator());
request.setAttribute(DataSource.class.getName(), actionTypeSettingsDataSource);
}
use of com.adobe.granite.ui.components.ds.SimpleDataSource in project aem-core-wcm-components by Adobe-Marketing-Cloud.
the class WorkflowModelDataSourceServlet method doGet.
@Override
protected void doGet(@Nonnull SlingHttpServletRequest request, @Nonnull SlingHttpServletResponse response) throws ServletException, IOException {
try {
WorkflowSession workflowSession = request.getResourceResolver().adaptTo(WorkflowSession.class);
ArrayList<Resource> resources = new ArrayList<>();
if (workflowSession != null) {
WorkflowModel[] models = workflowSession.getModels();
for (WorkflowModel model : models) {
resources.add(new WorkflowModelResource(model, request.getResourceResolver()));
}
}
SimpleDataSource dataSource = new SimpleDataSource(resources.iterator());
request.setAttribute(DataSource.class.getName(), dataSource);
} catch (WorkflowException e) {
throw new ServletException(e);
}
}
Aggregations