001/*- 002 * #%L 003 * HAPI FHIR JPA Server 004 * %% 005 * Copyright (C) 2014 - 2024 Smile CDR, Inc. 006 * %% 007 * Licensed under the Apache License, Version 2.0 (the "License"); 008 * you may not use this file except in compliance with the License. 009 * You may obtain a copy of the License at 010 * 011 * http://www.apache.org/licenses/LICENSE-2.0 012 * 013 * Unless required by applicable law or agreed to in writing, software 014 * distributed under the License is distributed on an "AS IS" BASIS, 015 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 016 * See the License for the specific language governing permissions and 017 * limitations under the License. 018 * #L% 019 */ 020package ca.uhn.fhir.jpa.packages; 021 022import org.apache.commons.lang3.Validate; 023 024public class PackageSearchSpec { 025 private int myStart; 026 private int mySize = 50; 027 private String myResourceUrl; 028 private CharSequence myDescription; 029 private String myFhirVersion; 030 private String myVersion; 031 private String myAuthor; 032 033 public String getFhirVersion() { 034 return myFhirVersion; 035 } 036 037 public void setFhirVersion(String theFhirVersion) { 038 myFhirVersion = theFhirVersion; 039 } 040 041 public int getSize() { 042 return mySize; 043 } 044 045 public void setSize(int theSize) { 046 Validate.inclusiveBetween(1, 250, theSize, "Number must be between 1-250"); 047 mySize = theSize; 048 } 049 050 public int getStart() { 051 return myStart; 052 } 053 054 public void setStart(int theStart) { 055 Validate.inclusiveBetween(0, Integer.MAX_VALUE, theStart, "Number must not be negative"); 056 myStart = theStart; 057 } 058 059 public String getResourceUrl() { 060 return myResourceUrl; 061 } 062 063 public void setResourceUrl(String theResourceUrl) { 064 myResourceUrl = theResourceUrl; 065 } 066 067 public CharSequence getDescription() { 068 return myDescription; 069 } 070 071 public void setDescription(CharSequence theDescription) { 072 myDescription = theDescription; 073 } 074 075 public String getVersion() { 076 return myVersion; 077 } 078 079 public void setVersion(String theVersion) { 080 myVersion = theVersion; 081 } 082 083 public void setAuthor(String theAuthor) { 084 myAuthor = theAuthor; 085 } 086 087 public String getAuthor() { 088 return myAuthor; 089 } 090}