=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java 2013-03-04 13:07:51 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/organisationunit/OrganisationUnit.java 2013-03-09 14:12:57 +0000 @@ -72,6 +72,11 @@ public static final String FEATURETYPE_POLYGON = "Polygon"; public static final String FEATURETYPE_POINT = "Point"; public static final String RESULTTYPE_SYMBOL = "Symbol"; + + public static final String KEY_USER_ORGUNIT = "USER_ORGUNIT"; + public static final String KEY_USER_ORGUNIT_CHILDREN = "USER_ORGUNIT_CHILDREN"; + + public static final List USER_KEYS = Arrays.asList( KEY_USER_ORGUNIT, KEY_USER_ORGUNIT_CHILDREN ); private static final List FEATURETYPES = Arrays.asList( FEATURETYPE_NONE, FEATURETYPE_MULTIPOLYGON, FEATURETYPE_POLYGON, FEATURETYPE_POINT ); === modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/smscommand/SMSCode.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/smscommand/SMSCode.java 2012-08-24 12:14:49 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/smscommand/SMSCode.java 2013-03-09 14:12:57 +0000 @@ -1,11 +1,37 @@ package org.hisp.dhis.smscommand; +/* + * Copyright (c) 2004-2012, University of Oslo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of the HISP project nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + import org.hisp.dhis.dataelement.DataElement; public class SMSCode { - - int id; // hibernate + int id; String code; @@ -64,5 +90,4 @@ { this.optionId = optionId; } - } === modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/smscommand/SMSCommand.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/smscommand/SMSCommand.java 2013-03-05 17:06:26 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/smscommand/SMSCommand.java 2013-03-09 14:12:57 +0000 @@ -1,14 +1,39 @@ package org.hisp.dhis.smscommand; +/* + * Copyright (c) 2004-2012, University of Oslo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of the HISP project nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + import java.util.Set; -import org.apache.commons.lang.StringUtils; import org.hisp.dhis.dataset.DataSet; import org.hisp.dhis.sms.parse.ParserType; public class SMSCommand { - private int id; // id for this element private String name; === modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/smscommand/SMSCommandService.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/smscommand/SMSCommandService.java 2012-06-13 08:44:07 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/smscommand/SMSCommandService.java 2013-03-09 14:12:57 +0000 @@ -1,13 +1,46 @@ package org.hisp.dhis.smscommand; +/* + * Copyright (c) 2004-2012, University of Oslo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of the HISP project nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + import java.util.Collection; import java.util.Set; -public interface SMSCommandService { - void updateSMSCommand(SMSCommand cmd); +public interface SMSCommandService +{ + void updateSMSCommand( SMSCommand cmd ); + Collection getSMSCommands(); - SMSCommand getSMSCommand(int id); - void save(SMSCommand cmd); - void save(Set codes); - void delete(SMSCommand cmd); + + SMSCommand getSMSCommand( int id ); + + void save( SMSCommand cmd ); + + void save( Set codes ); + + void delete( SMSCommand cmd ); } === modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/smscommand/SMSCommandStore.java' --- dhis-2/dhis-api/src/main/java/org/hisp/dhis/smscommand/SMSCommandStore.java 2012-06-14 09:41:45 +0000 +++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/smscommand/SMSCommandStore.java 2013-03-09 14:12:57 +0000 @@ -1,13 +1,44 @@ package org.hisp.dhis.smscommand; +/* + * Copyright (c) 2004-2012, University of Oslo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of the HISP project nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + import java.util.Collection; import java.util.Set; -public interface SMSCommandStore { +public interface SMSCommandStore +{ Collection getSMSCommands(); - SMSCommand getSMSCommand(int id); - int save(SMSCommand cmd); - void delete(SMSCommand cmd); - void save(Set codes); - + + SMSCommand getSMSCommand( int id ); + + int save( SMSCommand cmd ); + + void delete( SMSCommand cmd ); + + void save( Set codes ); }