dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #28728
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 14379: update descriptors to support sharing for new types
------------------------------------------------------------
revno: 14379
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2014-03-24 21:17:41 +0100
message:
update descriptors to support sharing for new types
modified:
dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/CategoryComboSchemaDescriptor.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/DataElementGroupSchemaDescriptor.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/DataElementGroupSetSchemaDescriptor.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OptionSetSchemaDescriptor.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitGroupSetSchemaDescriptor.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/SqlViewSchemaDescriptor.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntityAttributeSchemaDescriptor.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/UserRoleSchemaDescriptor.java
dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ValidationRuleGroupSchemaDescriptor.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/CategoryComboSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/CategoryComboSchemaDescriptor.java 2014-03-21 09:35:30 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/CategoryComboSchemaDescriptor.java 2014-03-24 20:17:41 +0000
@@ -28,6 +28,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import com.google.common.collect.Lists;
import org.hisp.dhis.dataelement.DataElementCategoryCombo;
import org.hisp.dhis.schema.Schema;
import org.hisp.dhis.schema.SchemaDescriptor;
@@ -42,6 +43,12 @@
@Override
public Schema getSchema()
{
- return new Schema( DataElementCategoryCombo.class, "categoryCombo", "categoryCombos", true, true, true );
+ Schema schema = new Schema( DataElementCategoryCombo.class, "categoryCombo", "categoryCombos", true, true, true );
+
+ schema.setShareable( true );
+ schema.setPublicAuthorities( Lists.newArrayList( "F_CATEGORY_COMBO_PUBLIC_ADD" ) );
+ schema.setPrivateAuthorities( Lists.newArrayList( "F_CATEGORY_COMBO_PRIVATE_ADD" ) );
+
+ return schema;
}
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/DataElementGroupSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/DataElementGroupSchemaDescriptor.java 2014-03-21 09:35:30 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/DataElementGroupSchemaDescriptor.java 2014-03-24 20:17:41 +0000
@@ -28,6 +28,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import com.google.common.collect.Lists;
import org.hisp.dhis.dataelement.DataElementGroup;
import org.hisp.dhis.schema.Schema;
import org.hisp.dhis.schema.SchemaDescriptor;
@@ -42,6 +43,12 @@
@Override
public Schema getSchema()
{
- return new Schema( DataElementGroup.class, "dataElementGroup", "dataElementsGroups", true, true, true );
+ Schema schema = new Schema( DataElementGroup.class, "dataElementGroup", "dataElementsGroups", true, true, true );
+
+ schema.setShareable( true );
+ schema.setPublicAuthorities( Lists.newArrayList( "F_DATAELEMENTGROUP_PUBLIC_ADD" ) );
+ schema.setPrivateAuthorities( Lists.newArrayList( "F_DATAELEMENTGROUP_PRIVATE_ADD" ) );
+
+ return schema;
}
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/DataElementGroupSetSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/DataElementGroupSetSchemaDescriptor.java 2014-03-21 09:35:30 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/DataElementGroupSetSchemaDescriptor.java 2014-03-24 20:17:41 +0000
@@ -28,6 +28,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import com.google.common.collect.Lists;
import org.hisp.dhis.dataelement.DataElementGroupSet;
import org.hisp.dhis.schema.Schema;
import org.hisp.dhis.schema.SchemaDescriptor;
@@ -42,6 +43,12 @@
@Override
public Schema getSchema()
{
- return new Schema( DataElementGroupSet.class, "dataElementGroupSet", "dataElementGroupSets", true, true, true );
+ Schema schema = new Schema( DataElementGroupSet.class, "dataElementGroupSet", "dataElementGroupSets", true, true, true );
+
+ schema.setShareable( true );
+ schema.setPublicAuthorities( Lists.newArrayList( "F_DATAELEMENTGROUPSET_PUBLIC_ADD" ) );
+ schema.setPrivateAuthorities( Lists.newArrayList( "F_DATAELEMENTGROUPSET_PRIVATE_ADD" ) );
+
+ return schema;
}
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OptionSetSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OptionSetSchemaDescriptor.java 2014-03-21 09:35:30 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OptionSetSchemaDescriptor.java 2014-03-24 20:17:41 +0000
@@ -28,9 +28,10 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import com.google.common.collect.Lists;
+import org.hisp.dhis.option.OptionSet;
import org.hisp.dhis.schema.Schema;
import org.hisp.dhis.schema.SchemaDescriptor;
-import org.hisp.dhis.option.OptionSet;
import org.springframework.stereotype.Component;
/**
@@ -42,6 +43,12 @@
@Override
public Schema getSchema()
{
- return new Schema( OptionSet.class, "optionSet", "optionSets", true, true, true );
+ Schema schema = new Schema( OptionSet.class, "optionSet", "optionSets", true, true, true );
+
+ schema.setShareable( true );
+ schema.setPublicAuthorities( Lists.newArrayList( "F_OPTIONSET_PUBLIC_ADD" ) );
+ schema.setPrivateAuthorities( Lists.newArrayList( "F_OPTIONSET_PRIVATE_ADD" ) );
+
+ return schema;
}
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitGroupSetSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitGroupSetSchemaDescriptor.java 2014-03-21 09:35:30 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/OrganisationUnitGroupSetSchemaDescriptor.java 2014-03-24 20:17:41 +0000
@@ -28,9 +28,10 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import com.google.common.collect.Lists;
+import org.hisp.dhis.organisationunit.OrganisationUnitGroupSet;
import org.hisp.dhis.schema.Schema;
import org.hisp.dhis.schema.SchemaDescriptor;
-import org.hisp.dhis.organisationunit.OrganisationUnitGroupSet;
import org.springframework.stereotype.Component;
/**
@@ -42,6 +43,12 @@
@Override
public Schema getSchema()
{
- return new Schema( OrganisationUnitGroupSet.class, "organisationUnitGroupSet", "organisationUnitGroupSets", true, true, true );
+ Schema schema = new Schema( OrganisationUnitGroupSet.class, "organisationUnitGroupSet", "organisationUnitGroupSets", true, true, true );
+
+ schema.setShareable( true );
+ schema.setPublicAuthorities( Lists.newArrayList( "F_ORGUNITGROUPSET_PUBLIC_ADD" ) );
+ schema.setPrivateAuthorities( Lists.newArrayList( "F_ORGUNITGROUPSET_PRIVATE_ADD" ) );
+
+ return schema;
}
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/SqlViewSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/SqlViewSchemaDescriptor.java 2014-03-21 09:35:30 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/SqlViewSchemaDescriptor.java 2014-03-24 20:17:41 +0000
@@ -28,6 +28,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import com.google.common.collect.Lists;
import org.hisp.dhis.schema.Schema;
import org.hisp.dhis.schema.SchemaDescriptor;
import org.hisp.dhis.sqlview.SqlView;
@@ -42,6 +43,12 @@
@Override
public Schema getSchema()
{
- return new Schema( SqlView.class, "sqlView", "sqlViews", true, true, true );
+ Schema schema = new Schema( SqlView.class, "sqlView", "sqlViews", true, true, true );
+
+ schema.setShareable( true );
+ schema.setPublicAuthorities( Lists.newArrayList( "F_SQLVIEW_PUBLIC_ADD" ) );
+ schema.setPrivateAuthorities( Lists.newArrayList( "F_SQLVIEW_PRIVATE_ADD" ) );
+
+ return schema;
}
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntityAttributeSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntityAttributeSchemaDescriptor.java 2014-03-21 09:35:30 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/TrackedEntityAttributeSchemaDescriptor.java 2014-03-24 20:17:41 +0000
@@ -28,6 +28,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import com.google.common.collect.Lists;
import org.hisp.dhis.schema.Schema;
import org.hisp.dhis.schema.SchemaDescriptor;
import org.hisp.dhis.trackedentity.TrackedEntityAttribute;
@@ -42,6 +43,12 @@
@Override
public Schema getSchema()
{
- return new Schema( TrackedEntityAttribute.class, "trackedEntityAttribute", "trackedEntityAttributes", false, false, true );
+ Schema schema = new Schema( TrackedEntityAttribute.class, "trackedEntityAttribute", "trackedEntityAttributes", false, false, true );
+
+ schema.setShareable( true );
+ schema.setPublicAuthorities( Lists.newArrayList( "F_TRACKED_ENTITY_ATTRIBUTE_PUBLIC_ADD" ) );
+ schema.setPrivateAuthorities( Lists.newArrayList( "F_TRACKED_ENTITY_ATTRIBUTE_PRIVATE_ADD" ) );
+
+ return schema;
}
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/UserRoleSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/UserRoleSchemaDescriptor.java 2014-03-21 09:35:30 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/UserRoleSchemaDescriptor.java 2014-03-24 20:17:41 +0000
@@ -28,6 +28,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import com.google.common.collect.Lists;
import org.hisp.dhis.schema.Schema;
import org.hisp.dhis.schema.SchemaDescriptor;
import org.hisp.dhis.user.UserAuthorityGroup;
@@ -42,6 +43,12 @@
@Override
public Schema getSchema()
{
- return new Schema( UserAuthorityGroup.class, "userRole", "userRoles", true, true, false );
+ Schema schema = new Schema( UserAuthorityGroup.class, "userRole", "userRoles", true, true, false );
+
+ schema.setShareable( true );
+ schema.setPublicAuthorities( Lists.newArrayList( "F_USERROLE_PUBLIC_ADD" ) );
+ schema.setPrivateAuthorities( Lists.newArrayList( "F_USERROLE_PRIVATE_ADD" ) );
+
+ return schema;
}
}
=== modified file 'dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ValidationRuleGroupSchemaDescriptor.java'
--- dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ValidationRuleGroupSchemaDescriptor.java 2014-03-21 09:35:30 +0000
+++ dhis-2/dhis-api/src/main/java/org/hisp/dhis/schema/descriptors/ValidationRuleGroupSchemaDescriptor.java 2014-03-24 20:17:41 +0000
@@ -28,6 +28,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+import com.google.common.collect.Lists;
import org.hisp.dhis.schema.Schema;
import org.hisp.dhis.schema.SchemaDescriptor;
import org.hisp.dhis.validation.ValidationRuleGroup;
@@ -42,6 +43,12 @@
@Override
public Schema getSchema()
{
- return new Schema( ValidationRuleGroup.class, "validationRuleGroup", "validationRuleGroups", true, true, true );
+ Schema schema = new Schema( ValidationRuleGroup.class, "validationRuleGroup", "validationRuleGroups", true, true, true );
+
+ schema.setShareable( true );
+ schema.setPublicAuthorities( Lists.newArrayList( "F_VALIDATIONRULEGROUP_PUBLIC_ADD" ) );
+ schema.setPrivateAuthorities( Lists.newArrayList( "F_VALIDATIONRULEGROUP_PRIVATE_ADD" ) );
+
+ return schema;
}
}