Package com.esri.gpt.framework.context

Examples of com.esri.gpt.framework.context.RequestContext


   * @throws SQLException if accessing database fails
   * @throws ImsServiceException if any other problem occurs
   */
  private void loadUserGroups(User user) throws SQLException, ImsServiceException {
    try {
      RequestContext requestContext = RequestContext.extract(null);
      IdentityAdapter identityAdapter = requestContext.newIdentityAdapter();
      identityAdapter.readUserGroups(user);
    } catch (Exception ex) {
      throw new ImsServiceException("Error evaluation asserting groups.");
    }
  }
View Full Code Here


*
*/
public void runWorker() {

 
  RequestContext rc = null;
  try {
      // rc = RequestContext.extract(this.getSearchContext().getHttpRequest());
    rc = this.getSearchContext().getRequestContext();
    RestQuery query = this.getSearchContext().getRestQuery();

View Full Code Here

* @see HarvestContext
*/
public void handleListOfEvents(ActionEvent event) {
  try {
    // start execution phase
    RequestContext context = onExecutionPhaseStarted();

    // check authorization
    authorizeAction(context);

    // check for a page cursor navigation event
View Full Code Here

*/
public String getListEventsView() {

  try {
    // start view preparation phase
    RequestContext context = onPrepareViewStarted();

    // check authorization
    authorizeAction(context);

    // prepare action criteria
View Full Code Here

*/
public String getViewReportView() {

  try {
    // start view preparation phase
    RequestContext context = onPrepareViewStarted();
    getReportViewer().setRequestContext(context);
    getReportViewer().setMsgBroker(extractMessageBroker());
    getReportViewer().setRecord(new HeRecord(new HrRecord()));

    String uuid = context.getServletRequest().getParameter("uuid");
    if (UuidUtil.isUuid(uuid)) {
      getCriteria().getActionCriteria().setEventUuid(uuid);
      setExternal(true);
    } else {
      // check authorization
View Full Code Here

* @return navigation outcome
*/
public String onClickButtonHistoryExecuteAction() {
  try {
    // start execution phase
    RequestContext context = onExecutionPhaseStarted();

    // check authorization
    authorizeAction(context);

    // get action
View Full Code Here

/**
* Determine if apply to all is allowable.
* @return <code>true</code> if apply to all is allowable
*/
public boolean getAllowApplyToAll() {
  RequestContext context = this.getContextBroker().extractRequestContext();
  StringAttributeMap params = context.getCatalogConfiguration().getParameters();
  String s = Val.chkStr(params.getValue("catalog.admin.allowApplyToAll"));
  return !s.equalsIgnoreCase("false");
}
View Full Code Here

/**
* Determine if collections are in use.
* @return <code>true</code> if collections are in use
*/
public boolean getUseCollections() {
  RequestContext context = this.getContextBroker().extractRequestContext();
  CollectionDao colDao = new CollectionDao(context);
  return colDao.getUseCollections();
}
View Full Code Here

  /**
   * Main unit test method.
   * @param args startup arguments
   */
  public static void main(String[] args) {
    RequestContext rc = null;
    try {
      rc = RequestContext.extract(null);
     
      String cswCtx = "/csw";
      String resPfx = "gpt/metadata/";
     
      String testFolder = "C:/Projects/GPT10/Portal/src/testdata/cswxmls";
      String path = testFolder+"/GetCapabilities_1.xml";
     
      path = testFolder+"/DescribeRecord_1.xml";
      //path = testFolder+"/GetCapabilities_1.xml";
      //path = testFolder+"/GetRecordById_1.xml";
      //path = testFolder+"/GetRecords_1.xml";
     
      String xml = com.esri.gpt.framework.xml.XmlIoUtil.readXml(path);
      System.err.println(xml);
     
      IProviderFactory self = new ProviderFactory();
      RequestHandler handler = self.makeRequestHandler(null,rc,cswCtx,resPfx);
     
      OperationResponse opResponse = handler.handleXML(xml);
      System.err.println(opResponse.getResponseXml());
     
    } catch (Throwable t) {
      t.printStackTrace(System.err);
    } finally {
      if (rc != null) rc.onExecutionPhaseCompleted();
    }
  }
View Full Code Here

       
        // set the message broker
        FacesContextBroker fcb = new FacesContextBroker(request,response);
        tocContext.setMessageBroker(fcb.extractMessageBroker());
       
        RequestContext requestCtx = fcb.extractRequestContext();
        // determine the XML file path
        String relativePath = "";
        TocCollection tocs = requestCtx.getCatalogConfiguration().getConfiguredTocs();
        if(tocs!= null && tocs.containsKey(key)){
          relativePath = tocs.get(key);
        } else{
          response.sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, "Toc not configured.");
          LOGGER.finer("Toc not configured for key " + key);
View Full Code Here

TOP

Related Classes of com.esri.gpt.framework.context.RequestContext

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.