Search in sources :

Example 71 with Schema

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

the class ProgramDataElementDimensionItemSchemaDescriptor method getSchema.

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

Example 72 with Schema

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

the class ProgramIndicatorGroupSchemaDescriptor method getSchema.

@Override
public Schema getSchema() {
    Schema schema = new Schema(ProgramIndicatorGroup.class, SINGULAR, PLURAL);
    schema.setRelativeApiEndpoint(API_ENDPOINT);
    schema.setOrder(1600);
    schema.getAuthorities().add(new Authority(AuthorityType.CREATE, Lists.newArrayList("F_PROGRAM_INDICATOR_GROUP_PUBLIC_ADD", "F_PROGRAM_INDICATOR_GROUP_PRIVATE_ADD")));
    schema.getAuthorities().add(new Authority(AuthorityType.DELETE, Lists.newArrayList("F_PROGRAM_INDICATOR_GROUP_DELETE")));
    return schema;
}
Also used : Authority(org.hisp.dhis.security.Authority) Schema(org.hisp.dhis.schema.Schema)

Example 73 with Schema

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

the class ProgramRuleActionSchemaDescriptor method getSchema.

@Override
public Schema getSchema() {
    Schema schema = new Schema(ProgramRuleAction.class, SINGULAR, PLURAL);
    schema.setRelativeApiEndpoint(API_ENDPOINT);
    schema.setOrder(1610);
    schema.getAuthorities().add(new Authority(AuthorityType.CREATE, Lists.newArrayList("F_PROGRAM_RULE_MANAGEMENT")));
    schema.getAuthorities().add(new Authority(AuthorityType.DELETE, Lists.newArrayList("F_PROGRAM_RULE_MANAGEMENT")));
    return schema;
}
Also used : Authority(org.hisp.dhis.security.Authority) Schema(org.hisp.dhis.schema.Schema)

Example 74 with Schema

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

the class TrackedEntityInstanceSchemaDescriptor method getSchema.

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

Example 75 with Schema

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

the class UserGroupSchemaDescriptor method getSchema.

@Override
public Schema getSchema() {
    Schema schema = new Schema(UserGroup.class, SINGULAR, PLURAL);
    schema.setRelativeApiEndpoint(API_ENDPOINT);
    schema.setOrder(102);
    schema.getAuthorities().add(new Authority(AuthorityType.CREATE_PUBLIC, Lists.newArrayList("F_USERGROUP_PUBLIC_ADD")));
    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