Package com.esri.gpt.framework.context

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


   */
  public void handleFullSynchronization(ActionEvent event)
          throws AbortProcessingException {

    // start execution phase
    RequestContext context = onExecutionPhaseStarted();

    try {
      submitFullSynchronization(context);
      createEditor(context, true);
    } catch (Throwable t) {
View Full Code Here


   */
  public void handleCancelSynchronization(ActionEvent event)
          throws AbortProcessingException {

    // start execution phase
    RequestContext context = onExecutionPhaseStarted();

    try {
      submitCancelSycnhronization(context);
      createEditor(context, true);
    } catch (Throwable t) {
View Full Code Here

   */
  public void handleUpdateRepository(ActionEvent event)
          throws AbortProcessingException {

    // start execution phase
    RequestContext context = onExecutionPhaseStarted();

    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();

        extractMessageBroker().addSuccessMessage(
                creating ? "catalog.harvest.manage.message.create.2" : "catalog.harvest.manage.message.update.2");
      }

    } catch (ValidationException e) {
      String sKey = e.getKey();
      if (sKey.length() > 0) {
        String sMsg = sKey;
        Schema schema = context.getCatalogConfiguration().getConfiguredSchemas().get(sKey);
        if (schema != null) {
          if (schema.getLabel() != null) {
            String sResKey = schema.getLabel().getResourceKey();
            if (sResKey.length() > 0) {
              sMsg = extractMessageBroker().retrieveMessage(sResKey) + " (" + sKey + ")";
View Full Code Here

   */
  public void handleTestConnection(ActionEvent event)
          throws AbortProcessingException {
    try {
      // start execution phase
      RequestContext context = onExecutionPhaseStarted();

      // check authorization
      authorizeAction(context);
     
      // perform check through the validator
View Full Code Here

   */
  public void handleTestAgpDestination(ActionEvent event)
          throws AbortProcessingException {
    try {
      // start execution phase
      RequestContext context = onExecutionPhaseStarted();

      // check authorization
      authorizeAction(context);
     
      // perform check through the validator
View Full Code Here

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

      // check authorization
      authorizeAction(context);

      // get action
View Full Code Here

   */
  public String getListRepositoriesView() {

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

      // check authorization
      authorizeAction(context);

      getResult().getQueryResult().getRecords().clear();
View Full Code Here

   */
  public String getEditRepositoryView() {

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

      // check authorization
      authorizeAction(context);

      // create editor
View Full Code Here

   * Gets synchronization statistics.
   *
   * @return synchronization statistics
   */
  public String getSynchronizationStatistics() {
    RequestContext context = onPrepareViewStarted();
    try {
      HrRecord record = getEditor().getRepository();
      if (record.getRecentJobStatus() == RecentJobStatus.Running) {
        Statistics stats = context.getApplicationContext().getHarvestingEngine().getStatistics(record.getUuid());
        if (stats != null) {
          String[] params = new String[]{
            Long.toString(stats.getHarvestedCount()),
            Long.toString(stats.getValidatedCount()),
            Long.toString(stats.getPublishedCount()),
            new TimePeriod(stats.getDuration()).toLocalizedString(extractMessageBroker()),
            Double.toString(stats.getPerformance())
          };
          return extractMessageBroker().retrieveMessage("catalog.harvest.manage.edit.syncRunningStats", params);
        }
      }
      return "";
    } finally {
      context.onExecutionPhaseCompleted();
    }
  }
View Full Code Here

   * @return empty string
   */
  public String getPrepareSelectedPublishers() {
    try {
      // start view preparation phase
      RequestContext context = onPrepareViewStarted();
      if (!_selectablePublishersBuild) {
        _selectablePublishers.build(context, isAdministrator(context));
        // read owner distinguished name and select record owner
        if (getEditor() != null && getEditor().getRepository() != null) {
          // read owner distinguished name
          HrRecord record = getEditor().getRepository();
          LocalDao localDao = new LocalDao(context);
          String uDN = localDao.readDN(record.getOwnerId());
          if (uDN.length() == 0) {
            User u = context.getUser();
            if (u != null) {
              uDN = u.getDistinguishedName();
            }
          }
          // check if this user already exist on the list of selectable publishers
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.