Examples of UpdateHandler


Examples of de.iritgo.aktera.persist.UpdateHandler

          Class klass = Class.forName(updateHandlerClassName);

          if (klass != null)
          {
            UpdateHandler updateHandler = (UpdateHandler) klass.newInstance();

            Connection con = null;

            try
            {
              con = dataSourceComponent.getConnection();
              updateHandler.setConnection(con);
              updateHandler.updateDatabase(request, logger, con, pf, (ModuleVersion) currentVersion
                      .clone(), newVersion);
            }
            finally
            {
              con.close();
            }

            needReboot = needReboot || updateHandler.needReboot();
            newUserPreferences = newUserPreferences || updateHandler.hasNewUserPreferences();
          }
          else
          {
            System.out.println("UpdateDatabase: Unable to find update handler for module '" + moduleId
                    + "'");
View Full Code Here

Examples of de.iritgo.aktera.persist.UpdateHandler

    Connection connection = null;

    try
    {
      connection = dataSourceComponent.getConnection();
      UpdateHandler handler = new UpdateHandler();
      handler.setConnection(connection);
      handler.update("ALTER TABLE version ALTER COLUMN name TYPE varchar(255)");
      handler.update("UPDATE version set name='iritgo-aktera-address' where name='svc-address' and type='M'");
      handler.update("UPDATE version set name='iritgo-aktera-aktario' where name='svc-aktario' and type='M'");
      handler
              .update("UPDATE version set name='iritgo-aktera-authentication' where name='svc-authentication-persist' and type='M'");
      handler
              .update("UPDATE version set name='iritgo-aktera-authorization' where name='svc-authorization-persist' and type='M'");
      handler.update("UPDATE version set name='iritgo-aktera-base' where name='aktera' and type='M'");
      handler
              .update("UPDATE version set name='iritgo-aktera-configuration' where name='svc-configuration' and type='M'");
      handler
              .update("UPDATE version set name='iritgo-aktera-crypto-bas64' where name='svc-crypto-base64' and type='M'");
      handler.update("UPDATE version set name='iritgo-aktera-email' where name='svc-email' and type='M'");
      handler.update("DELETE FROM version where name='svc-mail-javamail' and type='M'");
      handler.update("UPDATE version set name='iritgo-aktera-event' where name='svc-event' and type='M'");
      handler.update("UPDATE version set name='iritgo-aktera-fsm' where name='svc-fsm' and type='M'");
      handler
              .update("UPDATE version set name='iritgo-aktera-hibernate' where name='svc-persist-hibernate' and type='M'");
      handler.update("UPDATE version set name='iritgo-aktera-i18n' where name='svc-i18n' and type='M'");
      handler.update("UPDATE version set name='iritgo-aktera-importer' where name='svc-importer' and type='M'");
      handler
              .update("UPDATE version set name='iritgo-aktera-jpassgen' where name='svc-password-jpassgen' and type='M'");
      handler.update("UPDATE version set name='iritgo-aktera-logger' where name='svc-logger' and type='M'");
      handler.update("UPDATE version set name='iritgo-aktera-model' where name='svc-model-default' and type='M'");
      handler
              .update("UPDATE version set name='iritgo-aktera-permissions' where name='svc-permissions' and type='M'");
      handler
              .update("UPDATE version set name='iritgo-aktera-persist-base' where name='svc-persist-base' and type='M'");
      handler
              .update("UPDATE version set name='iritgo-aktera-persist-default' where name='svc-persist-default' and type='M'");
      handler
              .update("UPDATE version set name='iritgo-aktera-query-jdbc' where name='svc-query-jdbc' and type='M'");
      handler.update("UPDATE version set name='iritgo-aktera-reporting' where name='svc-reporting' and type='M'");
      handler.update("UPDATE version set name='iritgo-aktera-scheduler' where name='svc-scheduler' and type='M'");
      handler.update("UPDATE version set name='iritgo-aktera-script' where name='svc-script' and type='M'");
      handler.update("UPDATE version set name='iritgo-aktera-spring' where name='svc-spring' and type='M'");
      handler.update("UPDATE version set name='iritgo-aktera-startup' where name='svc-startup' and type='M'");
      handler.update("UPDATE version set name='iritgo-aktera-tools' where name='svc-tools' and type='M'");
      handler.update("UPDATE version set name='iritgo-aktera-ui' where name='svc-ui' and type='M'");
      handler
              .update("UPDATE version set name='iritgo-aktera-usergroup' where name='svc-usergroup-persist' and type='M'");
      handler.update("UPDATE version set name='iritgo-aktera' where name='iritgo' and type='A'");
      handler.update("UPDATE version set name='system' where name='system' and type='A'");
    }
    catch (Exception x)
    {
      System.out.println("[UpdateHelper.updatePreProcessing] Error: " + x.getMessage());
      x.printStackTrace();
View Full Code Here

Examples of denoflionsx.denLib.Mod.Handlers.WorldHandler.UpdateHandler

    @Subscribe
    @Override
    public void modsLoaded(FMLPostInitializationEvent evt) {
        Proxy.print("denLib load complete.");
        denLibCore.updater.startUpdaterThread();
        WorldEventHandler.registerHandler(new UpdateHandler());
        WorldEventHandler.registerHandler(new ChangeLogWorld());
        Proxy.print("This is denLib version " + "@VERSION@");
    }
View Full Code Here

Examples of org.apache.ace.agent.UpdateHandler

         * @param updateType
         *            the type of update we're performing, cannot be <code>null</code>.
         */
        private void checkForUpdate(UpdateType updateType) {
            try {
                UpdateHandler updateHandler = getUpdateHandler(updateType);

                Version installed = updateHandler.getInstalledVersion();
                Version available = updateHandler.getHighestAvailableVersion();
                if (installed != null && installed.compareTo(available) < 0) {
                    // Update available, ask the user whether we should download it...
                    if (!m_agentUser.downloadAvailableUpdate(updateType, getAgentId(), installed, available)) {
                        // No, we may not download this update now...
                        return;
                    }

                    System.out.printf("Downloading %s update (from v%s to v%s)...%n", updateType, installed, available);

                    DownloadHandle downloadHandle = updateHandler.getDownloadHandle(available, false /* fixPackage */);

                    Future<DownloadResult> future = downloadHandle.start(new DownloadProgressListener() {
                        @Override
                        public void progress(long bytesRead) {
                            System.out.printf("Download progress: %d bytes read...%n", bytesRead);
                        }
                    });
                    // Block until the download is complete...
                    DownloadResult result = future.get();

                    // Download is complete, ask the user once more if we're allowed to install the update...
                    if (m_agentUser.installAvailableUpdate(updateType, getAgentId(), installed, available)) {
                        System.out.printf("Installing %s update (from v%s to v%s)...%n", updateType, installed, available);

                        // We've confirmation that we can install this update...
                        updateHandler.install(result.getInputStream());
                    }

                    // Throw away downloaded packages...
                    downloadHandle.discard();
                }
View Full Code Here

Examples of org.apache.ace.agent.UpdateHandler

         * @param updateType
         *            the type of update we want an update handler for, cannot be <code>null</code>.
         * @return an {@link UpdateHandler} instance, never <code>null</code>.
         */
        private UpdateHandler getUpdateHandler(UpdateType updateType) {
            UpdateHandler updateHandler;
            if (UpdateType.AGENT == updateType) {
                updateHandler = m_agentControl.getAgentUpdateHandler();
            }
            else {
                updateHandler = m_agentControl.getDeploymentHandler();
View Full Code Here

Examples of org.apache.ace.agent.UpdateHandler

         * @param updateType
         *            the type of update we're performing, cannot be <code>null</code>.
         */
        private void checkForUpdate(UpdateType updateType) {
            try {
                UpdateHandler updateHandler = getUpdateHandler(updateType);

                Version installed = updateHandler.getInstalledVersion();
                Version available = updateHandler.getHighestAvailableVersion();
                if (installed != null && installed.compareTo(available) < 0) {
                    // Update available, ask the user whether we should download it...
                    if (!m_agentUser.downloadAvailableUpdate(updateType, getAgentId(), installed, available)) {
                        // No, we may not download this update now...
                        return;
                    }

                    logInfo("Downloading %s update (from v%s to v%s)...", updateType, installed, available);

                    DownloadHandle downloadHandle = updateHandler.getDownloadHandle(available, false /* fixPackage */);

                    Future<DownloadResult> future = downloadHandle.start(new DownloadProgressListener() {
                        @Override
                        public void progress(long bytesRead) {
                            logInfo("Download progress: %d bytes read...", bytesRead);
                        }
                    });
                    // Block until the download is complete...
                    DownloadResult result = future.get();

                    // Download is complete, ask the user once more if we're allowed to install the update...
                    if (m_agentUser.installAvailableUpdate(updateType, getAgentId(), installed, available)) {
                        logInfo("Installing %s update (from v%s to v%s)...", updateType, installed, available);

                        // We've confirmation that we can install this update...
                        updateHandler.install(result.getInputStream());
                    }

                    // Throw away downloaded packages...
                    downloadHandle.discard();
                }
View Full Code Here

Examples of org.apache.ace.agent.UpdateHandler

         * @param updateType
         *            the type of update we want an update handler for, cannot be <code>null</code>.
         * @return an {@link UpdateHandler} instance, never <code>null</code>.
         */
        private UpdateHandler getUpdateHandler(UpdateType updateType) {
            UpdateHandler updateHandler;
            if (UpdateType.AGENT == updateType) {
                updateHandler = m_agentContext.getHandler(AgentUpdateHandler.class);
            }
            else {
                updateHandler = m_agentContext.getHandler(DeploymentHandler.class);
View Full Code Here

Examples of org.apache.ambari.server.api.handlers.UpdateHandler

    return Type.PUT;
  }

  @Override
  protected RequestHandler getRequestHandler() {
    return new UpdateHandler();
  }
View Full Code Here

Examples of org.apache.sling.ide.eclipse.ui.nav.model.UpdateHandler

  /**
   * This is a callback that will allow us
   * to create the viewer and initialize it.
   */
  public void createPartControl(Composite parent) {
      SyncDirManager.registerUpdateListener(new UpdateHandler() {
           
            @Override
            public void syncDirUpdated(SyncDir syncDir) {
                refreshContent();
            }
View Full Code Here

Examples of org.apache.sling.installer.api.UpdateHandler

                        if ( tr.getState() == ResourceState.INSTALLED && tr.getDigest().equals(digest) ) {
                            logger.debug("Resource did not change {}", key);
                            return;
                        }
                    }
                    final UpdateHandler handler = this.findHandler(tr.getScheme());
                    if ( handler == null ) {
                        logger.debug("No handler found to handle update of resource with scheme {}", tr.getScheme());
                    } else {
                        final InputStream localIS = data.getInputStream();
                        try {
                            final UpdateResult result = (localIS == null ? handler.handleUpdate(resourceType, entityId, tr.getURL(), data.getDictionary(), attributes)
                                    : handler.handleUpdate(resourceType, entityId, tr.getURL(), localIS, attributes));
                            if ( result != null ) {
                                if ( !result.getURL().equals(tr.getURL()) && !result.getResourceIsMoved() ) {
                                    // resource has been added!
                                    final InternalResource internalResource = new InternalResource(result.getScheme(),
                                            result.getResourceId(),
                                            null,
                                            data.getDictionary(),
                                            (data.getDictionary() != null ? InstallableResource.TYPE_PROPERTIES : InstallableResource.TYPE_FILE),
                                            data.getDigest(result.getURL(), result.getDigest()),
                                            result.getPriority(),
                                            data.getDataFile(),
                                            null);
                                    final RegisteredResource rr = this.persistentList.addOrUpdate(internalResource);
                                    final TransformationResult transRes = new TransformationResult();
                                    // use the old entity id
                                    final int pos = erl.getResourceId().indexOf(':');
                                    transRes.setId(erl.getResourceId().substring(pos + 1));
                                    transRes.setResourceType(resourceType);
                                    if ( attributes != null ) {
                                        transRes.setAttributes(attributes);
                                    }
                                    this.persistentList.transform(rr, new TransformationResult[] {
                                            transRes
                                    });
                                    final EntityResourceList newGroup = this.persistentList.getEntityResourceList(key);
                                    newGroup.setFinishState(ResourceState.INSTALLED);
                                    newGroup.compact();
                                } else {
                                    // resource has been updated or moved
                                    ((RegisteredResourceImpl)tr).update(
                                            data.getDataFile(), data.getDictionary(),
                                            data.getDigest(result.getURL(), result.getDigest()),
                                            result.getPriority(),
                                            result.getURL());
                                    // We first set the state of the resource to install to make setFinishState work in all cases
                                    ((RegisteredResourceImpl)tr).setState(ResourceState.INSTALL);
                                    erl.setFinishState(ResourceState.INSTALLED);
                                    erl.compact();
                                }
                                updated = true;
                            }
                        } finally {
                            if ( localIS != null ) {
                                // always close the input stream!
                                try {
                                    localIS.close();
                                } catch (final IOException ignore) {
                                    // ignore
                                }
                            }
                        }
                    }

                }

                boolean created = false;
                if ( !updated ) {
                    // create
                    final List<UpdateHandler> handlerList = this.updateHandlerTracker.getSortedServices();
                    for(final UpdateHandler handler : handlerList) {
                        final InputStream localIS = data.getInputStream();
                        try {
                            final UpdateResult result = (localIS == null ? handler.handleUpdate(resourceType, entityId, null, data.getDictionary(), attributes)
                                    : handler.handleUpdate(resourceType, entityId, null, localIS, attributes));
                            if ( result != null ) {
                                final InternalResource internalResource = new InternalResource(result.getScheme(),
                                        result.getResourceId(),
                                        null,
                                        data.getDictionary(),
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.