Package com.esri.gpt.framework.security.principal

Examples of com.esri.gpt.framework.security.principal.Publisher


         ImsServiceException,
         SQLException,
         CredentialsDeniedException {
  String sSelectedKey = getSelectedKey();
  if (sSelectedKey.length() == 0) {
    return new Publisher(context);
  } else {
    User user = context.getUser();
    if (sSelectedKey.equals(user.getKey())) {
      return new Publisher(context);
    } else {
      Users users = Publisher.buildSelectablePublishers(context,forManagement);
      if (users.containsKey(sSelectedKey)) {
        return new Publisher(context,sSelectedKey);
      } else {
        throw new NotAuthorizedException("Not authorized.");
      }
    }
  }
View Full Code Here


      }
      if (Thread.currentThread().isInterrupted()) return;
     
      // process services on the ArcGIS server
      StringBuilder sbSummary = new StringBuilder();
      Publisher publisher = Publisher.makeSystemAdministrator(rContext);
      HttpClientRequest httpClient = HttpClientRequest.newRequest();
     
      ProcessingContext pContext = new ProcessingContext(rContext,publisher,httpClient,template,false);
      AGSProcessor ags = new AGSProcessor(pContext);
      ags.getTarget().setRestUrl(restUrl);
View Full Code Here

        } else if (bValidateOnly) {
          ValidationRequest request = new ValidationRequest(context,sFileName,sXml);
          request.verify();
          msgBroker.addSuccessMessage("catalog.publication.success.validated");
        } else {
          Publisher publisher = getSelectablePublishers().selectedAsPublisher(context,false);
          UploadRequest request = new UploadRequest(context,publisher,sFileName,sXml);
          request.publish();
          if (request.getPublicationRecord().getWasDocumentUnchanged()) {
            msgBroker.addSuccessMessage("publication.success.unchanged");
          } else if (request.getPublicationRecord().getWasDocumentReplaced()) {
            msgBroker.addSuccessMessage("publication.success.replaced");
          } else {
            msgBroker.addSuccessMessage("publication.success.created");
          }
        }

      // handle an empty explicit url or network path 
      } else if (sExplicitPath.length() == 0) {
        msgBroker.addErrorMessage("publication.uploadMetadata.err.file.required");
     
       // process an explicit url or network path
      } else {
        FacesMessage fm = new FacesMessage(FacesMessage.SEVERITY_WARN,sExplicitPath,null);
        msgBroker.addMessage(fm);
       
        sFileName = sExplicitPath;
        Publisher publisher = getSelectablePublishers().selectedAsPublisher(context,false);
        HttpClientRequest httpClient = HttpClientRequest.newRequest();
       
        ProcessingContext pContext = new ProcessingContext(context,publisher,httpClient,null,bValidateOnly);
        pContext.setMessageBroker(msgBroker);
        ProcessorFactory factory = new ProcessorFactory();
View Full Code Here

TOP

Related Classes of com.esri.gpt.framework.security.principal.Publisher

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.