Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
   * Copyright 2011 JBoss Inc
   * Licensed under the Apache License, Version 2.0 (the "License");
   * you may not use this file except in compliance with the License.
   * You may obtain a copy of the License at
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
  * limitations under the License.
 package org.drools.guvnor.server;
 import java.util.List;
     CategoryService {
     private static final long            serialVersionUID             = 12365;
     private ServiceSecurity serviceSecurity;
     public String[] loadChildCategories(String categoryPath) {
         return .loadChildCategoriescategoryPath );
     public Boolean createCategory(String path,
                                   String name,
                                   String description) {
         return .createCategorypath,
                                                             description );
     public void renameCategory(String fullPathAndName,
                                String newName) {
                                                      newName );

loadRuleListForCategories Role-based Authorization check: This method only returns rules that the user has permission to access. The user is considered to has permission to access the particular category when: The user has ANALYST_READ role or higher (i.e., ANALYST) to this category

in favour of loadRuleListForCategories(CategoryPageRequest)
     public TableDataResult loadRuleListForCategories(String categoryPath,
                                                      int skip,
                                                      int numRows,
                                                      String tableConfigthrows SerializationException {
         return .loadRuleListForCategoriescategoryPath,
                                                                        tableConfig );
         if ( request == null ) {
            throw new IllegalArgumentException"request cannot be null" );
        if ( request.getPageSize() != null && request.getPageSize() < 0 ) {
            throw new IllegalArgumentException"pageSize cannot be less than zero." );
        // Role-based Authorization check: This method only returns rules that
        // the user has permission to access. The user is considered to has
        // permission to access the particular category when: The user has
        // ANALYST_READ role or higher (i.e., ANALYST) to this category
            List<CategoryPageRowrowList = new ArrayList<CategoryPageRow>();
            return new PageResponseBuilder<CategoryPageRow>()
        return .loadRuleListForCategoriesrequest );
    public void removeCategory(String categoryPaththrows SerializationException {
        .removeCategorycategoryPath );
New to GrepCode? Check out our FAQ X