org.openmetadata.service.security.policyevaluator.PostResourceContext 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;
/** Posts that are part of conversation threads require special handling */
public record PostResourceContext(String postedBy) implements ResourceContextInterface {
@Override
public String getResource() {
return Entity.THREAD;
}
@Override
public List getOwners() {
List owners = new ArrayList<>();
owners.add(Entity.getEntityReferenceByName(Entity.USER, postedBy, Include.NON_DELETED));
return owners;
}
@Override
public List getTags() {
return null;
}
@Override
public EntityInterface getEntity() {
return null;
}
@Override
public EntityReference getDomain() {
return null;
}
}