Search in sources :

Example 1 with UserFieldDescriptors

use of com.thinkbiganalytics.metadata.modeshape.common.UserFieldDescriptors in project kylo by Teradata.

the class JcrFeedProvider method setUserFields.

@Override
public void setUserFields(@Nonnull final Set<UserFieldDescriptor> userFields) {
    UserFieldDescriptors descriptors = JcrUtil.getOrCreateNode(JcrUtil.getNode(getSession(), EntityUtil.pathForCategory()), EntityUtil.FEED_USER_FIELDS, UserFieldDescriptors.NODE_TYPE, UserFieldDescriptors.class);
    descriptors.setFields(userFields);
}
Also used : UserFieldDescriptors(com.thinkbiganalytics.metadata.modeshape.common.UserFieldDescriptors)

Example 2 with UserFieldDescriptors

use of com.thinkbiganalytics.metadata.modeshape.common.UserFieldDescriptors in project kylo by Teradata.

the class JcrCategoryProvider method setUserFieldDesriptors.

private void setUserFieldDesriptors(JcrCategory category, Set<UserFieldDescriptor> fieldDescrs) {
    if (category.getDetails().isPresent()) {
        UserFieldDescriptors descriptors = JcrUtil.getOrCreateNode(category.getDetails().get().getNode(), CategoryDetails.FEED_USER_FIELDS, UserFieldDescriptors.NODE_TYPE, UserFieldDescriptors.class);
        descriptors.setFields(fieldDescrs);
    } else {
        throw new AccessControlException("Permission denied adding feed fields to category: " + category.getTitle());
    }
}
Also used : UserFieldDescriptors(com.thinkbiganalytics.metadata.modeshape.common.UserFieldDescriptors) AccessControlException(java.security.AccessControlException)

Example 3 with UserFieldDescriptors

use of com.thinkbiganalytics.metadata.modeshape.common.UserFieldDescriptors in project kylo by Teradata.

the class JcrCategoryProvider method setUserFields.

@Override
public void setUserFields(@Nonnull final Set<UserFieldDescriptor> userFields) {
    UserFieldDescriptors descriptors = JcrUtil.getOrCreateNode(JcrUtil.getNode(getSession(), EntityUtil.pathForCategory()), EntityUtil.CATEGORY_USER_FIELDS, UserFieldDescriptors.NODE_TYPE, UserFieldDescriptors.class);
    descriptors.setFields(userFields);
}
Also used : UserFieldDescriptors(com.thinkbiganalytics.metadata.modeshape.common.UserFieldDescriptors)

Aggregations

UserFieldDescriptors (com.thinkbiganalytics.metadata.modeshape.common.UserFieldDescriptors)3 AccessControlException (java.security.AccessControlException)1