diff --git a/hopsworks-common/src/main/java/io/hops/hopsworks/common/featurestore/metadata/FeatureStoreTagController.java b/hopsworks-common/src/main/java/io/hops/hopsworks/common/featurestore/metadata/FeatureStoreTagController.java new file mode 100644 index 0000000000..4045014e00 --- /dev/null +++ b/hopsworks-common/src/main/java/io/hops/hopsworks/common/featurestore/metadata/FeatureStoreTagController.java @@ -0,0 +1,138 @@ +/* + * This file is part of Hopsworks + * Copyright (C) 2024, Hopsworks AB. All rights reserved + * + * Hopsworks is free software: you can redistribute it and/or modify it under the terms of + * the GNU Affero General Public License as published by the Free Software Foundation, + * either version 3 of the License, or (at your option) any later version. + * + * Hopsworks is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; + * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + * PURPOSE. See the GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License along with this program. + * If not, see . + */ + +package io.hops.hopsworks.common.featurestore.metadata; + +import io.hops.hopsworks.common.integrations.CommunityStereotype; +import io.hops.hopsworks.exceptions.FeatureStoreMetadataException; +import io.hops.hopsworks.exceptions.FeaturestoreException; +import io.hops.hopsworks.persistence.entity.featurestore.featuregroup.Featuregroup; +import io.hops.hopsworks.persistence.entity.featurestore.featureview.FeatureView; +import io.hops.hopsworks.persistence.entity.featurestore.metadata.FeatureStoreTag; +import io.hops.hopsworks.persistence.entity.featurestore.trainingdataset.TrainingDataset; + +import javax.ejb.Stateless; +import javax.ejb.TransactionAttribute; +import javax.ejb.TransactionAttributeType; +import java.util.Map; +import java.util.Optional; + +@Stateless +@CommunityStereotype +@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED) +public class FeatureStoreTagController implements FeatureStoreTagControllerIface { + @Override + public Optional getTag(Featuregroup featureGroup, String name) + throws FeatureStoreMetadataException { + throw new IllegalArgumentException("API not supported in the community edition"); + } + + @Override + public Optional getTag(FeatureView featureView, String name) + throws FeatureStoreMetadataException { + throw new IllegalArgumentException("API not supported in the community edition"); + } + + @Override + public Optional getTag(TrainingDataset trainingDataset, String name) + throws FeatureStoreMetadataException { + throw new IllegalArgumentException("API not supported in the community edition"); + } + + @Override + public Map getTags(Featuregroup featureGroup) { + throw new IllegalArgumentException("API not supported in the community edition"); + } + + @Override + public Map getTags(FeatureView featureView) { + throw new IllegalArgumentException("API not supported in the community edition"); + } + + @Override + public Map getTags(TrainingDataset trainingDataset) { + throw new IllegalArgumentException("API not supported in the community edition"); + } + + @Override + public AttachMetadataResult upsertTag(Featuregroup featureGroup, String name, String value) + throws FeatureStoreMetadataException, FeaturestoreException { + throw new IllegalArgumentException("API not supported in the community edition"); + } + + @Override + public AttachMetadataResult upsertTag(FeatureView featureView, String name, String value) + throws FeatureStoreMetadataException, FeaturestoreException { + throw new IllegalArgumentException("API not supported in the community edition"); + } + + @Override + public AttachMetadataResult upsertTag(TrainingDataset trainingDataset, String name, String value) + throws FeatureStoreMetadataException, FeaturestoreException { + throw new IllegalArgumentException("API not supported in the community edition"); + } + + @Override + public AttachMetadataResult upsertTags(Featuregroup featureGroup, Map tags) + throws FeatureStoreMetadataException, FeaturestoreException { + throw new IllegalArgumentException("API not supported in the community edition"); + } + + @Override + public AttachMetadataResult upsertTags(FeatureView featureView, Map tags) + throws FeatureStoreMetadataException, FeaturestoreException { + throw new IllegalArgumentException("API not supported in the community edition"); + } + + @Override + public AttachMetadataResult upsertTags(TrainingDataset trainingDataset, Map tags) + throws FeatureStoreMetadataException, FeaturestoreException { + throw new IllegalArgumentException("API not supported in the community edition"); + } + + @Override + public void deleteTag(Featuregroup featureGroup, String name) + throws FeatureStoreMetadataException, FeaturestoreException { + throw new IllegalArgumentException("API not supported in the community edition"); + } + + @Override + public void deleteTag(TrainingDataset trainingDataset, String name) + throws FeatureStoreMetadataException, FeaturestoreException { + throw new IllegalArgumentException("API not supported in the community edition"); + } + + @Override + public void deleteTag(FeatureView featureView, String name) + throws FeatureStoreMetadataException, FeaturestoreException { + throw new IllegalArgumentException("API not supported in the community edition"); + } + + @Override + public void deleteTags(Featuregroup featureGroup) throws FeaturestoreException { + throw new IllegalArgumentException("API not supported in the community edition"); + } + + @Override + public void deleteTags(TrainingDataset trainingDataset) throws FeaturestoreException { + throw new IllegalArgumentException("API not supported in the community edition"); + } + + @Override + public void deleteTags(FeatureView featureView) throws FeaturestoreException { + throw new IllegalArgumentException("API not supported in the community edition"); + } +}