@@ -55,6 +55,8 @@ public class SearchParameters {
5555
5656 private int accuracy = 0 ;
5757
58+ private int privacyFilter = 0 ;
59+
5860 private String safeSearch ;
5961
6062 private String [] machineTags ;
@@ -70,11 +72,11 @@ public class SearchParameters {
7072 private String radiusUnits ;
7173
7274 private boolean hasGeo = false ;
73-
75+
7476 private boolean inGallery = false ;
75-
77+
7678 private boolean isCommons = false ;
77-
79+
7880 private boolean isGetty = false ;
7981
8082 public static final ThreadLocal <SimpleDateFormat > DATE_FORMATS = new ThreadLocal <SimpleDateFormat >() {
@@ -139,6 +141,30 @@ public int getAccuracy() {
139141 return accuracy ;
140142 }
141143
144+ /**
145+ * @return the privacyFilter
146+ */
147+ public int getPrivacyFilter () {
148+ return privacyFilter ;
149+ }
150+
151+ /**
152+ * @param privacyFilter
153+ * Return photos only matching a certain privacy level.
154+ *
155+ * This only applies when making an authenticated call to view photos you own. Valid values are:
156+ * <ul>
157+ * <li>1 public photos
158+ * <li>2 private photos visible to friends
159+ * <li>3 private photos visible to family
160+ * <li>4 private photos visible to friends & family
161+ * <li>5 completely private photos
162+ * </ul>
163+ */
164+ public void setPrivacyFilter (int privacyFilter ) {
165+ this .privacyFilter = privacyFilter ;
166+ }
167+
142168 public String getGroupId () {
143169 return groupId ;
144170 }
@@ -366,6 +392,7 @@ public void setSort(int order) {
366392 * @return A placeId
367393 * @see com.flickr4java.flickr.places.PlacesInterface#resolvePlaceId(String)
368394 */
395+ @ SuppressWarnings ("javadoc" )
369396 public String getPlaceId () {
370397 return placeId ;
371398 }
@@ -385,6 +412,7 @@ public String getPlaceId() {
385412 * @see com.flickr4java.flickr.places.Place#getPlaceId()
386413 * @see com.flickr4java.flickr.places.Location#getPlaceId()
387414 */
415+ @ SuppressWarnings ("javadoc" )
388416 public void setPlaceId (String placeId ) {
389417 this .placeId = placeId ;
390418 }
@@ -584,6 +612,10 @@ public Map<String, Object> getAsParameters() {
584612 parameters .put ("is_getty" , "true" );
585613 }
586614
615+ if (privacyFilter > 0 ) {
616+ parameters .put ("privacy_filter" , Integer .toString (privacyFilter ));
617+ }
618+
587619 if (extras != null && !extras .isEmpty ()) {
588620 parameters .put ("extras" , StringUtilities .join (extras , "," ));
589621 }
0 commit comments