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

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


      wherePhrase.append(" AND ").append(tableAlias).append("DOCUUID <> ").append(tableAlias).append("SITEUUID ");
      args.put("sSiteUuid", sSiteUuid);
    }

    // document owner
    Publisher owner = null;
    if (getOwner().length()>0) {
      RequestContext context2 = null;
      try {
        if (context != null) {
          owner = new Publisher(context, getOwner());
        } else {
          context2 = RequestContext.extract(null);
          owner = new Publisher(context2, getOwner());
        }
      } catch (Exception ex) {
        LOGGER.log(Level.FINER, "Error creating publisher", ex);
      } finally {
        if (context2 != null) context2.onExecutionPhaseCompleted();
      }
    } else {
      if (publisher!=null && !publisher.getIsAdministrator()) {
        owner = publisher;
      }
    }
    if (owner!=null) {
      appendExpression(wherePhrase, "" +tableAlias+ "OWNER = ?");
      args.put("nUserId", new Integer(owner.getLocalID()));
    }

    // approval status
    String sStatus = getApprovalStatus();
    if ((sStatus.length() > 0) && !sStatus.equals(MmdEnums.ApprovalStatus.any.toString())) {
View Full Code Here


    try {
      getEditor().setTimeCodes(_timeCodes);
      _timeCodes = "";
     
      // copy ownership
      Publisher owner = getSelectablePublishers().selectedAsPublisher(context, true);
      if (owner != null) {
        getEditor().getRepository().setOwnerId(owner.getLocalID());
      }
      getEditor().prepareForUpdate();
      if (getEditor().validate(extractMessageBroker())) {
        HrCompleteUpdateRequest req = new HrCompleteUpdateRequest(context, getEditor().getRepository());
        boolean creating = req.execute();
View Full Code Here

  setOnBehalfOf(adminDao.queryOwnerDN(sOpenDocumentUuid));
  getLogger().finer("Opening editor for document="+sOpenDocumentUuid+", ownerDn="+getOnBehalfOf());
   
  // prepare the publisher
  getSelectablePublishers().setSelectedKey(getOnBehalfOf());
  Publisher publisher = getSelectablePublishers().selectedAsPublisher(context,false);
 
  // prepare the schema for edit
  MetadataDocument document = new MetadataDocument();
  Schema schema = document.prepareForEdit(context,publisher,sOpenDocumentUuid);
  setOpenSchemaKey(schema.getKey());
View Full Code Here

  String sXml = XmlIoUtil.domToString(dom);
  getLogger().finer("Updated template xml:\n"+sXml);
 
  // prepare the publisher
  getSelectablePublishers().setSelectedKey(getOnBehalfOf());
  Publisher publisher = getSelectablePublishers().selectedAsPublisher(context,false);

  //  the document
 
  if (validateOnly) {
   
View Full Code Here

* Creates new processing context.
* @param requestContext request context
* @return processing context
*/
private ProcessingContext newProcessingContext(RequestContext requestContext) {
  Publisher publisher = null;
  HttpClientRequest httpClient = HttpClientRequest.newRequest();
  ProcessingContext processingContext = new ProcessingContext(requestContext, publisher, httpClient, null, false);

  FacesContextBroker contextBroker = new FacesContextBroker();
  MessageBroker msgBroker = contextBroker.extractMessageBroker();
View Full Code Here

  // check for an ownership transfer request
  if (sAction.equalsIgnoreCase("transfer")) {
    String sNewOwner = getActionCriteria().getTransferToOwner();
    if (sNewOwner.length() > 0) {
      Publisher newOwner = new Publisher(getRequestContext(), sNewOwner);
      String sNewOwnerName = newOwner.getName();
      String sNewFolderUuid = newOwner.getFolderUuid();
      executeTransfer(adminDao, uuids, sNewOwnerName, sNewFolderUuid);
    }
  }

  // check for an assign Acl request
View Full Code Here

  // check for an ownership transfer request
  if (sAction.equalsIgnoreCase("transfer")) {
    String sNewOwner = getActionCriteria().getTransferToOwner();
    if (sNewOwner.length() > 0) {
      Publisher newOwner = new Publisher(getRequestContext(), sNewOwner);
      nRows = adminDao.transferOwnership(getPublisher(), queryCriteria, newOwner.getLocalID());
    }
  }

  // check for an assign Acl request
  if (sAction.equalsIgnoreCase("assignAcl")) {
View Full Code Here

        addSpaces(sb,6);
        statWriter.writeElement("duration",new TimePeriod(rb.getDuration()).toLocalizedString(messageBroker),false,false);
        addSpaces(sb,5);
        sb.append("},");
        addSpaces(sb,5);
        Publisher publisher = eu.getPublisher();
        sb.append("\"publisher\":{");
        addSpaces(sb,6);
        statWriter.writeElement("name",String.valueOf(publisher.getName()),true,false);
        addSpaces(sb,6);
        statWriter.writeElement("hasAdministratorRole",String.valueOf(publisher.getIsAdministrator()),false,false);
        addSpaces(sb,5);
        sb.append("},");
        addSpaces(sb,5);
        HrRecord hrecord = eu.getRepository();
        sb.append("\"hrRecord\": {");
View Full Code Here

  String url = xml.substring(xml.indexOf("<gptAgsUrl>") + 11,
      xml.indexOf("</gptAgsUrl>")).trim();

  if (url != null && url.length() > 0){
    Publisher publisher = new Publisher(context);
        HttpClientRequest httpClient = HttpClientRequest.newRequest();
        ProcessingContext pContext = new ProcessingContext(context,publisher,httpClient,null,false);
        ProcessorFactory factory = new ProcessorFactory();
        ResourceProcessor processor = factory.interrogate(pContext,url);
        if (processor == null) {
View Full Code Here

  String axlResponse = "";
  getLogger().finer("Intercepting publication request...");
  try {

    // prepare the publisher
    Publisher publisher = new Publisher(context);

    // publication request
    PublicationRequest publishRequest = new PublicationRequest(context,
        publisher, xml);
    publishRequest.getPublicationRecord().setSourceFileName(sourceUri);
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.