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

net.anotheria.anosite.gen.shared.service.BasicService Maven / Gradle / Ivy

There is a newer version: 4.1.2
Show newest version
/**
 ********************************************************************************
 *** BasicService.java                                                        ***
 *** generated by AnoSiteGenerator (ASG), Version: 3.2.2                      ***
 *** Copyright (C) 2005 - 2023 Anotheria.net, www.anotheria.net               ***
 *** All Rights Reserved.                                                     ***
 ********************************************************************************
 *** Don't edit this code, if you aren't sure                                 ***
 *** that you do exactly know what you are doing!                             ***
 *** It's better to invest time in the generator, as into the generated code. ***
 ********************************************************************************
 */

package net.anotheria.anosite.gen.shared.service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import net.anotheria.anoprise.metafactory.MetaFactory;
import net.anotheria.anoprise.metafactory.Extension;
import net.anotheria.anoprise.metafactory.MetaFactoryException;
import org.slf4j.MarkerFactory;
import org.codehaus.jettison.json.JSONObject;
import net.anotheria.anosite.gen.shared.util.ModuleName;
import net.anotheria.anosite.gen.shared.util.DocumentName;
import net.anotheria.asg.exception.ASGRuntimeException;
import net.anotheria.anosite.gen.asgenericdata.service.IASGenericDataService;
import net.anotheria.anosite.gen.ascustomdata.service.IASCustomDataService;
import net.anotheria.anosite.gen.asfederateddata.service.IASFederatedDataService;
import net.anotheria.anosite.gen.images.service.IImagesService;
import net.anotheria.anosite.gen.aslayoutdata.service.IASLayoutDataService;
import net.anotheria.anosite.gen.assitedata.service.IASSiteDataService;
import net.anotheria.anosite.gen.assiteconfig.service.IASSiteConfigService;
import net.anotheria.anosite.gen.aswebdata.service.IASWebDataService;
import net.anotheria.anosite.gen.asresourcedata.service.IASResourceDataService;
import net.anotheria.anosite.gen.asgenericaction.service.IASGenericActionService;
import net.anotheria.anosite.gen.ascustomaction.service.IASCustomActionService;
import net.anotheria.anosite.gen.asaction.service.IASActionService;
import net.anotheria.anosite.gen.aswizarddata.service.IASWizardDataService;
import net.anotheria.anosite.gen.asuserdata.service.IASUserDataService;
import net.anotheria.anosite.gen.anoaccessconfiguration.service.IAnoAccessConfigurationService;
import net.anotheria.anosite.gen.anoaccessapplicationdata.service.IAnoAccessApplicationDataService;
import net.anotheria.anosite.gen.asfeature.service.IASFeatureService;
import net.anotheria.anosite.gen.asexperiment.service.IASExperimentService;
import net.anotheria.anosite.gen.asbrand.service.IASBrandService;
import net.anotheria.asg.service.AbstractASGService;

public abstract class BasicService extends AbstractASGService{

	protected Logger log;

	private static Object serviceInstantiationLock = new Object();

	// CMS instances of different services.
	private static volatile IASGenericDataService asgenericdataService;
	private static volatile IASCustomDataService ascustomdataService;
	private static volatile IASFederatedDataService asfederateddataService;
	private static volatile IImagesService imagesService;
	private static volatile IASLayoutDataService aslayoutdataService;
	private static volatile IASSiteDataService assitedataService;
	private static volatile IASSiteConfigService assiteconfigService;
	private static volatile IASWebDataService aswebdataService;
	private static volatile IASResourceDataService asresourcedataService;
	private static volatile IASGenericActionService asgenericactionService;
	private static volatile IASCustomActionService ascustomactionService;
	private static volatile IASActionService asactionService;
	private static volatile IASWizardDataService aswizarddataService;
	private static volatile IASUserDataService asuserdataService;
	private static volatile IAnoAccessConfigurationService anoaccessconfigurationService;
	private static volatile IAnoAccessApplicationDataService anoaccessapplicationdataService;
	private static volatile IASFeatureService asfeatureService;
	private static volatile IASExperimentService asexperimentService;
	private static volatile IASBrandService asbrandService;

	protected BasicService(){
		log = LoggerFactory.getLogger("AnoSiteLog");
	}

	protected IASGenericDataService getASGenericDataService(){
		if (asgenericdataService == null){
			synchronized(serviceInstantiationLock){
				if (asgenericdataService == null){
					try{
						asgenericdataService = MetaFactory.get(IASGenericDataService.class, Extension.EDITORINTERFACE);
					}catch(MetaFactoryException e){
						log.error(MarkerFactory.getMarker("FATAL"), "Can't load editor instance of module service ASGenericData", e);
					}
				}
			}
		}
		return asgenericdataService;
	}

	protected IASCustomDataService getASCustomDataService(){
		if (ascustomdataService == null){
			synchronized(serviceInstantiationLock){
				if (ascustomdataService == null){
					try{
						ascustomdataService = MetaFactory.get(IASCustomDataService.class, Extension.EDITORINTERFACE);
					}catch(MetaFactoryException e){
						log.error(MarkerFactory.getMarker("FATAL"), "Can't load editor instance of module service ASCustomData", e);
					}
				}
			}
		}
		return ascustomdataService;
	}

	protected IASFederatedDataService getASFederatedDataService(){
		if (asfederateddataService == null){
			synchronized(serviceInstantiationLock){
				if (asfederateddataService == null){
					try{
						asfederateddataService = MetaFactory.get(IASFederatedDataService.class, Extension.EDITORINTERFACE);
					}catch(MetaFactoryException e){
						log.error(MarkerFactory.getMarker("FATAL"), "Can't load editor instance of module service ASFederatedData", e);
					}
				}
			}
		}
		return asfederateddataService;
	}

	protected IImagesService getImagesService(){
		if (imagesService == null){
			synchronized(serviceInstantiationLock){
				if (imagesService == null){
					try{
						imagesService = MetaFactory.get(IImagesService.class, Extension.EDITORINTERFACE);
					}catch(MetaFactoryException e){
						log.error(MarkerFactory.getMarker("FATAL"), "Can't load editor instance of module service Images", e);
					}
				}
			}
		}
		return imagesService;
	}

	protected IASLayoutDataService getASLayoutDataService(){
		if (aslayoutdataService == null){
			synchronized(serviceInstantiationLock){
				if (aslayoutdataService == null){
					try{
						aslayoutdataService = MetaFactory.get(IASLayoutDataService.class, Extension.EDITORINTERFACE);
					}catch(MetaFactoryException e){
						log.error(MarkerFactory.getMarker("FATAL"), "Can't load editor instance of module service ASLayoutData", e);
					}
				}
			}
		}
		return aslayoutdataService;
	}

	protected IASSiteDataService getASSiteDataService(){
		if (assitedataService == null){
			synchronized(serviceInstantiationLock){
				if (assitedataService == null){
					try{
						assitedataService = MetaFactory.get(IASSiteDataService.class, Extension.EDITORINTERFACE);
					}catch(MetaFactoryException e){
						log.error(MarkerFactory.getMarker("FATAL"), "Can't load editor instance of module service ASSiteData", e);
					}
				}
			}
		}
		return assitedataService;
	}

	protected IASSiteConfigService getASSiteConfigService(){
		if (assiteconfigService == null){
			synchronized(serviceInstantiationLock){
				if (assiteconfigService == null){
					try{
						assiteconfigService = MetaFactory.get(IASSiteConfigService.class, Extension.EDITORINTERFACE);
					}catch(MetaFactoryException e){
						log.error(MarkerFactory.getMarker("FATAL"), "Can't load editor instance of module service ASSiteConfig", e);
					}
				}
			}
		}
		return assiteconfigService;
	}

	protected IASWebDataService getASWebDataService(){
		if (aswebdataService == null){
			synchronized(serviceInstantiationLock){
				if (aswebdataService == null){
					try{
						aswebdataService = MetaFactory.get(IASWebDataService.class, Extension.EDITORINTERFACE);
					}catch(MetaFactoryException e){
						log.error(MarkerFactory.getMarker("FATAL"), "Can't load editor instance of module service ASWebData", e);
					}
				}
			}
		}
		return aswebdataService;
	}

	protected IASResourceDataService getASResourceDataService(){
		if (asresourcedataService == null){
			synchronized(serviceInstantiationLock){
				if (asresourcedataService == null){
					try{
						asresourcedataService = MetaFactory.get(IASResourceDataService.class, Extension.EDITORINTERFACE);
					}catch(MetaFactoryException e){
						log.error(MarkerFactory.getMarker("FATAL"), "Can't load editor instance of module service ASResourceData", e);
					}
				}
			}
		}
		return asresourcedataService;
	}

	protected IASGenericActionService getASGenericActionService(){
		if (asgenericactionService == null){
			synchronized(serviceInstantiationLock){
				if (asgenericactionService == null){
					try{
						asgenericactionService = MetaFactory.get(IASGenericActionService.class, Extension.EDITORINTERFACE);
					}catch(MetaFactoryException e){
						log.error(MarkerFactory.getMarker("FATAL"), "Can't load editor instance of module service ASGenericAction", e);
					}
				}
			}
		}
		return asgenericactionService;
	}

	protected IASCustomActionService getASCustomActionService(){
		if (ascustomactionService == null){
			synchronized(serviceInstantiationLock){
				if (ascustomactionService == null){
					try{
						ascustomactionService = MetaFactory.get(IASCustomActionService.class, Extension.EDITORINTERFACE);
					}catch(MetaFactoryException e){
						log.error(MarkerFactory.getMarker("FATAL"), "Can't load editor instance of module service ASCustomAction", e);
					}
				}
			}
		}
		return ascustomactionService;
	}

	protected IASActionService getASActionService(){
		if (asactionService == null){
			synchronized(serviceInstantiationLock){
				if (asactionService == null){
					try{
						asactionService = MetaFactory.get(IASActionService.class, Extension.EDITORINTERFACE);
					}catch(MetaFactoryException e){
						log.error(MarkerFactory.getMarker("FATAL"), "Can't load editor instance of module service ASAction", e);
					}
				}
			}
		}
		return asactionService;
	}

	protected IASWizardDataService getASWizardDataService(){
		if (aswizarddataService == null){
			synchronized(serviceInstantiationLock){
				if (aswizarddataService == null){
					try{
						aswizarddataService = MetaFactory.get(IASWizardDataService.class, Extension.EDITORINTERFACE);
					}catch(MetaFactoryException e){
						log.error(MarkerFactory.getMarker("FATAL"), "Can't load editor instance of module service ASWizardData", e);
					}
				}
			}
		}
		return aswizarddataService;
	}

	protected IASUserDataService getASUserDataService(){
		if (asuserdataService == null){
			synchronized(serviceInstantiationLock){
				if (asuserdataService == null){
					try{
						asuserdataService = MetaFactory.get(IASUserDataService.class, Extension.EDITORINTERFACE);
					}catch(MetaFactoryException e){
						log.error(MarkerFactory.getMarker("FATAL"), "Can't load editor instance of module service ASUserData", e);
					}
				}
			}
		}
		return asuserdataService;
	}

	protected IAnoAccessConfigurationService getAnoAccessConfigurationService(){
		if (anoaccessconfigurationService == null){
			synchronized(serviceInstantiationLock){
				if (anoaccessconfigurationService == null){
					try{
						anoaccessconfigurationService = MetaFactory.get(IAnoAccessConfigurationService.class, Extension.EDITORINTERFACE);
					}catch(MetaFactoryException e){
						log.error(MarkerFactory.getMarker("FATAL"), "Can't load editor instance of module service AnoAccessConfiguration", e);
					}
				}
			}
		}
		return anoaccessconfigurationService;
	}

	protected IAnoAccessApplicationDataService getAnoAccessApplicationDataService(){
		if (anoaccessapplicationdataService == null){
			synchronized(serviceInstantiationLock){
				if (anoaccessapplicationdataService == null){
					try{
						anoaccessapplicationdataService = MetaFactory.get(IAnoAccessApplicationDataService.class, Extension.EDITORINTERFACE);
					}catch(MetaFactoryException e){
						log.error(MarkerFactory.getMarker("FATAL"), "Can't load editor instance of module service AnoAccessApplicationData", e);
					}
				}
			}
		}
		return anoaccessapplicationdataService;
	}

	protected IASFeatureService getASFeatureService(){
		if (asfeatureService == null){
			synchronized(serviceInstantiationLock){
				if (asfeatureService == null){
					try{
						asfeatureService = MetaFactory.get(IASFeatureService.class, Extension.EDITORINTERFACE);
					}catch(MetaFactoryException e){
						log.error(MarkerFactory.getMarker("FATAL"), "Can't load editor instance of module service ASFeature", e);
					}
				}
			}
		}
		return asfeatureService;
	}

	protected IASExperimentService getASExperimentService(){
		if (asexperimentService == null){
			synchronized(serviceInstantiationLock){
				if (asexperimentService == null){
					try{
						asexperimentService = MetaFactory.get(IASExperimentService.class, Extension.EDITORINTERFACE);
					}catch(MetaFactoryException e){
						log.error(MarkerFactory.getMarker("FATAL"), "Can't load editor instance of module service ASExperiment", e);
					}
				}
			}
		}
		return asexperimentService;
	}

	protected IASBrandService getASBrandService(){
		if (asbrandService == null){
			synchronized(serviceInstantiationLock){
				if (asbrandService == null){
					try{
						asbrandService = MetaFactory.get(IASBrandService.class, Extension.EDITORINTERFACE);
					}catch(MetaFactoryException e){
						log.error(MarkerFactory.getMarker("FATAL"), "Can't load editor instance of module service ASBrand", e);
					}
				}
			}
		}
		return asbrandService;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy