Package org.gatein.management.api.operation.model

Examples of org.gatein.management.api.operation.model.ReadResourceModel


                    }
                }
            }
        }

        resultHandler.completed(new ReadResourceModel("Available artifacts for site " + getSiteKey(site), children));
    }
View Full Code Here


                }
            } else if (pageOrNav) {
                children.add(site.getName());
            }
        }
        resultHandler.completed(new ReadResourceModel(
                "Available sites for site type '" + getSiteType(siteType).getName() + "'", children));
    }
View Full Code Here

        Set<String> children = new LinkedHashSet<String>(3);
        children.add("portalsites");
        children.add("groupsites");
        children.add("usersites");

        resultHandler.completed(new ReadResourceModel("Available site types.", children));
    }
View Full Code Here

                    }
                }
            }
        }

        resultHandler.completed(new ReadResourceModel("Available artifacts for site " + getSiteKey(site), children));
    }
View Full Code Here

                }
            } else {
                children.add(site.getName());
            }
        }
        resultHandler.completed(new ReadResourceModel(
                "Available sites for site type '" + getSiteType(siteType).getName() + "'", children));
    }
View Full Code Here

*/
public class SiteLayoutReadResource extends AbstractSiteOperationHandler {
    @Override
    protected void execute(OperationContext operationContext, ResultHandler resultHandler, Site site)
            throws ResourceNotFoundException, OperationException {
        ReadResourceModel readResource = new ReadResourceModel("The site layout for site " + site.getName(),
                Collections.<String> emptySet());

        resultHandler.completed(readResource);
    }
View Full Code Here

        Set<String> children = new LinkedHashSet<String>(3);
        children.add("portalsites");
        children.add("groupsites");
        children.add("usersites");

        resultHandler.completed(new ReadResourceModel("Available site types.", children));
    }
View Full Code Here

        for (NodeContext child : node.getNodes()) {
            children.add(child.getName());
        }

        ReadResourceModel model = new ReadResourceModel("Navigation nodes available at this resource.", children);
        resultHandler.completed(model);
    }
View Full Code Here

            Set<String> children = new LinkedHashSet<String>(pageList.size());
            for (Page page : pageList) {
                children.add(page.getName());
            }

            resultHandler.completed(new ReadResourceModel("List of all available pages for site '"
                    + rootPage.getSite().getName() + "'", children));
        } else {
            PageService pageService = operationContext.getRuntimeContext().getRuntimeComponent(PageService.class);
            PageKey pageKey = new PageKey(getSiteKey(rootPage.getSite()), pageName);

            if (pageService.loadPage(pageKey) == null) {
                throw new ResourceNotFoundException("No page found for " + pageKey);
            }

            resultHandler.completed(new ReadResourceModel("List of child pages for page '" + pageName + "'", Collections
                    .<String> emptySet()));
        }
    }
View Full Code Here

            Object result = resultHandler.getResult();

            // Set descriptions based on the ManagedResource so 'dynamic' extensions don't have to.
            if (result instanceof ReadResourceModel)
            {
               ReadResourceModel readResource = (ReadResourceModel) result;
               if (!readResource.isChildDescriptionsSet())
               {
                  populateChildDescriptions(root, address, readResource);
               }

               if (readResource.getOperations().isEmpty())
               {
                  Map<String, ManagedDescription> descriptions = root.getOperationDescriptions(address);
                  for (Map.Entry<String, ManagedDescription> desc : descriptions.entrySet())
                  {
                     readResource.addOperation(new NamedDescription(desc.getKey(), desc.getValue().getDescription()));
                  }
               }
            }

            return new SuccessfulResponse<Object>(bindingProvider, result, request.getContentType());
View Full Code Here

TOP

Related Classes of org.gatein.management.api.operation.model.ReadResourceModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.