package com.l7tech.gateway.common.admin;

import com.l7tech.gateway.common.AsyncAdminMethods;
import com.l7tech.gateway.common.security.rbac.MethodStereotype;
import com.l7tech.gateway.common.security.rbac.Secured;
import com.l7tech.identity.UserBean;
import com.l7tech.objectmodel.Goid;
import com.l7tech.policy.bundle.BundleInfo;
import com.l7tech.policy.bundle.BundleMapping;
import com.l7tech.policy.bundle.PolicyBundleDryRunResult;
import com.l7tech.util.Pair;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

@Secured
@Administrative
public interface PolicyBundleInstallerAdmin extends AsyncAdminMethods {
   @Secured(stereotype = MethodStereotype.UNCHECKED_WIDE_OPEN)
   @NotNull
   String getVersion();

   @Secured(stereotype = MethodStereotype.UNCHECKED_WIDE_OPEN)
   @NotNull
   List<BundleInfo> getAllComponents() throws PolicyBundleInstallerAdmin.PolicyBundleInstallerException;

   @Secured(stereotype = MethodStereotype.UNCHECKED_WIDE_OPEN)
   void setAuthenticatedUser(@Nullable UserBean var1);

   @Secured(stereotype = MethodStereotype.TEST_CONFIGURATION)
   @NotNull
   AsyncAdminMethods.JobId<PolicyBundleDryRunResult> dryRunInstall(
      @NotNull Collection<String> var1, @NotNull Map<String, BundleMapping> var2, @Nullable String var3
   );

   @Secured(stereotype = MethodStereotype.TEST_CONFIGURATION)
   @NotNull
   AsyncAdminMethods.JobId<PolicyBundleDryRunResult> dryRunInstall(
      @NotNull Collection<String> var1, @NotNull Map<String, BundleMapping> var2, @NotNull Goid var3, @Nullable String var4
   );

   @Secured(stereotype = MethodStereotype.SAVE_OR_UPDATE, relevantArg = 1)
   @NotNull
   AsyncAdminMethods.JobId<ArrayList> install(@NotNull Collection<String> var1, @NotNull Goid var2, @NotNull Map<String, BundleMapping> var3) throws PolicyBundleInstallerAdmin.PolicyBundleInstallerException;

   @Secured(stereotype = MethodStereotype.SAVE_OR_UPDATE, relevantArg = 1)
   @NotNull
   AsyncAdminMethods.JobId<ArrayList> install(
      @NotNull Collection<String> var1,
      @NotNull Goid var2,
      @NotNull Map<String, BundleMapping> var3,
      @Nullable String var4,
      @Nullable Map<String, Map<String, Pair<String, Properties>>> var5
   ) throws PolicyBundleInstallerAdmin.PolicyBundleInstallerException;

   class PolicyBundleInstallerException extends Exception {
      static final long serialVersionUID = -7062552569451834000L;

      public PolicyBundleInstallerException(String var1) {
         super(var1);
      }

      public PolicyBundleInstallerException(String var1, Throwable var2) {
         super(var1, var2);
      }

      public PolicyBundleInstallerException(Throwable var1) {
         super(var1);
      }
   }
}
