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
   *
   *       http://www.apache.org/licenses/LICENSE-2.0
   *
  * 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;
 
 
 
 @Named("org.drools.guvnor.client.rpc.CategoryService")
     implements
     CategoryService {
 
     private static final long            serialVersionUID             = 12365;
 
     @Inject
     private ServiceSecurity serviceSecurity;
 
     @Inject
 
     @WebRemote
     @LoggedIn
     public String[] loadChildCategories(String categoryPath) {
         return .loadChildCategoriescategoryPath );
     }
 
     @WebRemote
     public Boolean createCategory(String path,
                                   String name,
                                   String description) {
         return .createCategorypath,
                                                             name,
                                                             description );
     }
 
     @WebRemote
     @LoggedIn
     public void renameCategory(String fullPathAndName,
                                String newName) {
         .renameCategoryfullPathAndName,
                                                      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

Deprecated:
in favour of loadRuleListForCategories(CategoryPageRequest)
 
     @WebRemote
     @LoggedIn
     public TableDataResult loadRuleListForCategories(String categoryPath,
                                                      int skip,
                                                      int numRows,
                                                      String tableConfigthrows SerializationException {
         return .loadRuleListForCategoriescategoryPath,
                                                                        skip,
                                                                        numRows,
                                                                        tableConfig );
     }
 
     @WebRemote
     @LoggedIn
         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>()
                    .withStartRowIndex(request.getStartRowIndex())
                    .withPageRowList(rowList)
                    .withLastPage(true)
                    .buildWithTotalRowCount(0);
        }
        return .loadRuleListForCategoriesrequest );
    }
    @WebRemote
    @LoggedIn
    public void removeCategory(String categoryPaththrows SerializationException {
        .removeCategorycategoryPath );
    }
New to GrepCode? Check out our FAQ X