org.openmetadata.service.security.policyevaluator.ThreadResourceContext Maven / Gradle / Ivy
package org.openmetadata.service.security.policyevaluator;
import java.util.ArrayList;
import java.util.List;
import org.openmetadata.schema.EntityInterface;
import org.openmetadata.schema.type.EntityReference;
import org.openmetadata.schema.type.Include;
import org.openmetadata.schema.type.TagLabel;
import org.openmetadata.service.Entity;
/** Conversation threads require special handling */
public record ThreadResourceContext(String createdBy) implements ResourceContextInterface {
@Override
public String getResource() {
return Entity.THREAD;
}
@Override
public List getOwners() {
List owners = new ArrayList<>();
owners.add(Entity.getEntityReferenceByName(Entity.USER, createdBy, Include.NON_DELETED));
return owners;
}
@Override
public List getTags() {
return null;
}
@Override
public EntityInterface getEntity() {
return null;
}
// TODO: Fix this this should be thread.getEntity().getDomain()
@Override
public EntityReference getDomain() {
return null;
}
}