nl.vpro.domain.constraint.media.HasGeoRestrictionConstraint Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of api-domain Show documentation
Show all versions of api-domain Show documentation
Contains the objects used by the Frontend API, like forms and result objects
/*
* Copyright (C) 2013 All rights reserved
* VPRO The Netherlands
*/
package nl.vpro.domain.constraint.media;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import nl.vpro.domain.constraint.ExistsConstraint;
import nl.vpro.domain.media.MediaObject;
/**
* @author Michiel Meeuwissen
* @since 3.3
*/
@XmlAccessorType(XmlAccessType.NONE)
@XmlType(name = "hasGeoRestrictionConstraintType")
public class HasGeoRestrictionConstraint implements ExistsConstraint {
@Override
public String getESPath() {
return "regions";
}
@Override
public boolean test(MediaObject input) {
return ! input.getGeoRestrictions().isEmpty();
}
@Override
public String toString() {
return getClass().getSimpleName();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy