All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.beigesoft.replicator.service.PrepareDbAfterGetCopy Maven / Gradle / Ivy

Go to download

It replicate/persist any entity according XML settings and user's requirements with a file or network (HTTP). Right now it has implemented XML format of stored/transferred data.

The newest version!
package org.beigesoft.replicator.service;

/*
 * Beigesoft ™
 *
 * Licensed under the Apache License, Version 2.0
 *
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 */

import java.util.Map;
import java.util.Date;
import java.io.Writer;

import org.beigesoft.factory.IFactoryAppBeans;
import org.beigesoft.delegate.IDelegator;
import org.beigesoft.log.ILogger;

/**
 * 

Service that release AppFactory beans.

* * @author Yury Demidenko */ public class PrepareDbAfterGetCopy implements IDelegator { /** *

Factory App-Beans.

**/ private IFactoryAppBeans factoryAppBeans; /** *

Logger.

**/ private ILogger logger; /** *

It prepares database after import.

* @param pAddParams additional params * @throws Exception - an exception **/ @Override public final void make( final Map pAddParams) throws Exception { this.factoryAppBeans.releaseBeans(); Writer htmlWriter = (Writer) pAddParams.get("htmlWriter"); if (htmlWriter != null) { htmlWriter.write("

" + new Date().toString() + ", " + PrepareDbAfterGetCopy.class.getSimpleName() + ", app-factory beans has released" + "

"); } this.logger.info(PrepareDbAfterGetCopy.class, "app-factory beans has released"); } //Simple getters and setters: /** *

Getter for factoryAppBeans.

* @return IFactoryAppBeans **/ public final IFactoryAppBeans getFactoryAppBeans() { return this.factoryAppBeans; } /** *

Setter for factoryAppBeans.

* @param pFactoryAppBeans reference **/ public final void setFactoryAppBeans( final IFactoryAppBeans pFactoryAppBeans) { this.factoryAppBeans = pFactoryAppBeans; } /** *

Getter for logger.

* @return ILogger **/ public final ILogger getLogger() { return this.logger; } /** *

Setter for logger.

* @param pLogger reference **/ public final void setLogger(final ILogger pLogger) { this.logger = pLogger; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy