package com.l7tech.gateway.common.solutionkit;

import com.l7tech.gateway.common.AsyncAdminMethods;
import com.l7tech.gateway.common.admin.Administrative;
import com.l7tech.gateway.common.security.rbac.MethodStereotype;
import com.l7tech.gateway.common.security.rbac.Secured;
import com.l7tech.objectmodel.DeleteException;
import com.l7tech.objectmodel.EntityType;
import com.l7tech.objectmodel.FindException;
import com.l7tech.objectmodel.Goid;
import com.l7tech.objectmodel.SaveException;
import com.l7tech.objectmodel.UpdateException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Throwable.class)
@Secured(types = EntityType.SOLUTION_KIT)
@Administrative
public interface SolutionKitAdmin extends AsyncAdminMethods {
   @Transactional(readOnly = true)
   @Secured(stereotype = MethodStereotype.FIND_ENTITIES)
   @NotNull
   List<SolutionKit> getSolutionKitsToUpgrade(@Nullable SolutionKit var1) throws FindException;

   @Transactional(readOnly = true)
   @Secured(stereotype = MethodStereotype.TEST_CONFIGURATION)
   @NotNull
   String testInstall(@NotNull SolutionKit var1, @NotNull String var2, boolean var3) throws Exception;

   @Transactional(readOnly = true)
   @Secured(stereotype = MethodStereotype.TEST_CONFIGURATION)
   @NotNull
   String testUpgrade(@NotNull SolutionKitImportInfo var1) throws Exception;

   @Transactional(readOnly = true)
   @Secured(stereotype = MethodStereotype.TEST_CONFIGURATION)
   @NotNull
   AsyncAdminMethods.JobId<String> testInstallAsync(@NotNull SolutionKit var1, @NotNull String var2, boolean var3);

   @Transactional(readOnly = true)
   @Secured(stereotype = MethodStereotype.TEST_CONFIGURATION)
   @NotNull
   AsyncAdminMethods.JobId<String> testUpgradeAsync(@NotNull SolutionKitImportInfo var1);

   @Secured(stereotype = MethodStereotype.SAVE)
   @NotNull
   Goid install(@NotNull SolutionKit var1, @NotNull String var2, boolean var3) throws Exception;

   @Secured(stereotype = MethodStereotype.SAVE)
   @NotNull
   ArrayList upgrade(@NotNull SolutionKitImportInfo var1) throws Exception;

   @Secured(stereotype = MethodStereotype.SAVE)
   @NotNull
   AsyncAdminMethods.JobId<Goid> installAsync(@NotNull SolutionKit var1, @NotNull String var2, boolean var3);

   @Secured(stereotype = MethodStereotype.SAVE)
   @NotNull
   AsyncAdminMethods.JobId<ArrayList> upgradeAsync(@NotNull SolutionKitImportInfo var1);

   @Secured(stereotype = MethodStereotype.DELETE_BY_ID)
   @NotNull
   String uninstall(@NotNull Goid var1) throws Exception;

   @Secured(stereotype = MethodStereotype.DELETE_BY_ID)
   @NotNull
   AsyncAdminMethods.JobId<String> uninstallAsync(@NotNull Goid var1);

   @Transactional(readOnly = true)
   @Secured(stereotype = MethodStereotype.FIND_HEADERS)
   @NotNull
   Collection<SolutionKitHeader> findHeaders() throws FindException;

   @Transactional(readOnly = true)
   @Secured(stereotype = MethodStereotype.FIND_HEADERS)
   @NotNull
   Collection<SolutionKitHeader> findHeaders(@NotNull Goid var1) throws FindException;

   @Transactional(readOnly = true)
   @Secured(stereotype = MethodStereotype.FIND_ENTITIES)
   @NotNull
   Collection<SolutionKit> find(@NotNull String var1) throws FindException;

   @Transactional(readOnly = true)
   @Secured(stereotype = MethodStereotype.FIND_ENTITIES)
   @NotNull
   Collection<SolutionKit> find(@NotNull Goid var1) throws FindException;

   @Transactional(readOnly = true)
   @Secured(stereotype = MethodStereotype.FIND_ENTITY)
   SolutionKit get(@NotNull Goid var1) throws FindException;

   @Transactional(readOnly = true)
   @Secured(stereotype = MethodStereotype.FIND_ENTITY)
   SolutionKit get(@NotNull String var1, @Nullable String var2) throws FindException;

   @Secured(stereotype = MethodStereotype.SAVE)
   @NotNull
   Goid save(@NotNull SolutionKit var1) throws SaveException;

   @Secured(stereotype = MethodStereotype.UPDATE)
   void update(@NotNull SolutionKit var1) throws UpdateException;

   @Secured(stereotype = MethodStereotype.DELETE_BY_ID)
   void delete(@NotNull Goid var1) throws FindException, DeleteException;
}
