Search in sources :

Example 96 with Schema

use of org.hisp.dhis.schema.Schema in project dhis2-core by dhis2.

the class DataElementGroupSchemaDescriptor method getSchema.

@Override
public Schema getSchema() {
    Schema schema = new Schema(DataElementGroup.class, SINGULAR, PLURAL);
    schema.setRelativeApiEndpoint(API_ENDPOINT);
    schema.setOrder(1210);
    schema.getAuthorities().add(new Authority(AuthorityType.CREATE_PUBLIC, Lists.newArrayList("F_DATAELEMENTGROUP_PUBLIC_ADD")));
    schema.getAuthorities().add(new Authority(AuthorityType.CREATE_PRIVATE, Lists.newArrayList("F_DATAELEMENTGROUP_PRIVATE_ADD")));
    schema.getAuthorities().add(new Authority(AuthorityType.DELETE, Lists.newArrayList("F_DATAELEMENTGROUP_DELETE")));
    return schema;
}
Also used : Authority(org.hisp.dhis.security.Authority) Schema(org.hisp.dhis.schema.Schema)

Example 97 with Schema

use of org.hisp.dhis.schema.Schema in project dhis2-core by dhis2.

the class DataElementOperandSchemaDescriptor method getSchema.

@Override
public Schema getSchema() {
    Schema schema = new Schema(DataElementOperand.class, SINGULAR, PLURAL);
    schema.setRelativeApiEndpoint(API_ENDPOINT);
    return schema;
}
Also used : Schema(org.hisp.dhis.schema.Schema)

Example 98 with Schema

use of org.hisp.dhis.schema.Schema in project dhis2-core by dhis2.

the class AttributeValueSchemaDescriptor method getSchema.

@Override
public Schema getSchema() {
    Schema schema = new Schema(AttributeValue.class, SINGULAR, PLURAL);
    schema.setOrder(Ordered.HIGHEST_PRECEDENCE);
    return schema;
}
Also used : Schema(org.hisp.dhis.schema.Schema)

Example 99 with Schema

use of org.hisp.dhis.schema.Schema in project dhis2-core by dhis2.

the class CategoryComboSchemaDescriptor method getSchema.

@Override
public Schema getSchema() {
    Schema schema = new Schema(DataElementCategoryCombo.class, SINGULAR, PLURAL);
    schema.setRelativeApiEndpoint(API_ENDPOINT);
    schema.setOrder(1180);
    schema.getAuthorities().add(new Authority(AuthorityType.CREATE_PUBLIC, Lists.newArrayList("F_CATEGORY_COMBO_PUBLIC_ADD")));
    schema.getAuthorities().add(new Authority(AuthorityType.CREATE_PRIVATE, Lists.newArrayList("F_CATEGORY_COMBO_PRIVATE_ADD")));
    schema.getAuthorities().add(new Authority(AuthorityType.DELETE, Lists.newArrayList("F_CATEGORY_COMBO_DELETE")));
    return schema;
}
Also used : Authority(org.hisp.dhis.security.Authority) Schema(org.hisp.dhis.schema.Schema)

Example 100 with Schema

use of org.hisp.dhis.schema.Schema in project dhis2-core by dhis2.

the class CategoryOptionGroupSchemaDescriptor method getSchema.

@Override
public Schema getSchema() {
    Schema schema = new Schema(CategoryOptionGroup.class, SINGULAR, PLURAL);
    schema.setRelativeApiEndpoint(API_ENDPOINT);
    schema.setOrder(1150);
    schema.getAuthorities().add(new Authority(AuthorityType.CREATE_PUBLIC, Lists.newArrayList("F_CATEGORY_OPTION_GROUP_PUBLIC_ADD")));
    schema.getAuthorities().add(new Authority(AuthorityType.CREATE_PRIVATE, Lists.newArrayList("F_CATEGORY_OPTION_GROUP_PRIVATE_ADD")));
    schema.getAuthorities().add(new Authority(AuthorityType.DELETE, Lists.newArrayList("F_CATEGORY_OPTION_GROUP_DELETE")));
    return schema;
}
Also used : Authority(org.hisp.dhis.security.Authority) Schema(org.hisp.dhis.schema.Schema)

Aggregations

Schema (org.hisp.dhis.schema.Schema)149 Authority (org.hisp.dhis.security.Authority)65 Property (org.hisp.dhis.schema.Property)29 ArrayList (java.util.ArrayList)20 IdentifiableObject (org.hisp.dhis.common.IdentifiableObject)20 Test (org.junit.Test)16 Collection (java.util.Collection)14 List (java.util.List)13 HashMap (java.util.HashMap)12 DhisSpringTest (org.hisp.dhis.DhisSpringTest)12 EmbeddedObject (org.hisp.dhis.common.EmbeddedObject)12 Map (java.util.Map)10 BaseIdentifiableObject (org.hisp.dhis.common.BaseIdentifiableObject)10 User (org.hisp.dhis.user.User)10 AnalyticalObject (org.hisp.dhis.common.AnalyticalObject)9 BaseAnalyticalObject (org.hisp.dhis.common.BaseAnalyticalObject)9 UserCredentials (org.hisp.dhis.user.UserCredentials)9 HashSet (java.util.HashSet)8 Set (java.util.Set)8 Log (org.apache.commons.logging.Log)8