package com.l7tech.server.module;

import com.l7tech.gateway.common.module.ModuleState;
import com.l7tech.gateway.common.module.ServerModuleFile;
import com.l7tech.gateway.common.module.ServerModuleFileState;
import com.l7tech.objectmodel.EntityHeader;
import com.l7tech.objectmodel.EntityManager;
import com.l7tech.objectmodel.FindException;
import com.l7tech.objectmodel.Goid;
import com.l7tech.objectmodel.UpdateException;
import com.l7tech.util.Pair;
import java.io.InputStream;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public interface ServerModuleFileManager extends EntityManager<ServerModuleFile, EntityHeader> {
   void updateState(Goid var1, ModuleState var2) throws UpdateException;

   void updateState(Goid var1, String var2) throws UpdateException;

   ServerModuleFileState findStateForCurrentNode(ServerModuleFile var1);

   boolean isModuleUploadEnabled();

   @Nullable
   Pair<InputStream, String> getModuleBytesAsStreamWithSignature(@NotNull Goid var1) throws FindException;

   @Nullable
   ServerModuleFile findModuleWithSha256(@NotNull String var1) throws FindException;
}
