org.drools.guvnor.server
Class RepositoryCategoryService

java.lang.Object
  extended by org.drools.guvnor.server.RepositoryCategoryService
All Implemented Interfaces:
com.google.gwt.user.client.rpc.RemoteService, CategoryService

@Name(value="org.drools.guvnor.client.rpc.CategoryService")
@AutoCreate
public class RepositoryCategoryService
extends Object
implements CategoryService


Constructor Summary
RepositoryCategoryService()
           
 
Method Summary
 void create()
           
 Boolean createCategory(String path, String name, String description)
          This will create a new category at the specified path.
 RulesRepository getRulesRepository()
           
 String[] loadChildCategories(String categoryPath)
           
 PageResponse<CategoryPageRow> loadRuleListForCategories(CategoryPageRequest request)
          Return a list of Assets by category.
 TableDataResult loadRuleListForCategories(String categoryPath, int skip, int numRows, String tableConfig)
          Deprecated. in favour of loadRuleListForCategories(CategoryPageRequest)
 void removeCategory(String categoryPath)
          This will remove a category.
 void renameCategory(String fullPathAndName, String newName)
          Rename a category - taking in the full path, and just the new name.
 void setRulesRepository(RulesRepository repository)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepositoryCategoryService

public RepositoryCategoryService()
Method Detail

create

@Create
public void create()

setRulesRepository

public void setRulesRepository(RulesRepository repository)

getRulesRepository

public RulesRepository getRulesRepository()

loadChildCategories

@WebRemote
@Restrict(value="#{identity.loggedIn}")
public String[] loadChildCategories(String categoryPath)
Specified by:
loadChildCategories in interface CategoryService
Parameters:
categoryPath - A "/" delimited path to a category.

createCategory

@WebRemote
public Boolean createCategory(String path,
                                        String name,
                                        String description)
Description copied from interface: CategoryService
This will create a new category at the specified path.

Specified by:
createCategory in interface CategoryService

renameCategory

@WebRemote
@Restrict(value="#{identity.loggedIn}")
public void renameCategory(String fullPathAndName,
                                              String newName)
Description copied from interface: CategoryService
Rename a category - taking in the full path, and just the new name.

Specified by:
renameCategory in interface CategoryService

loadRuleListForCategories

@WebRemote
@Restrict(value="#{identity.loggedIn}")
public TableDataResult loadRuleListForCategories(String categoryPath,
                                                                    int skip,
                                                                    int numRows,
                                                                    String tableConfig)
                                          throws com.google.gwt.user.client.rpc.SerializationException
Deprecated. in favour of loadRuleListForCategories(CategoryPageRequest)

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

Specified by:
loadRuleListForCategories in interface CategoryService
Throws:
com.google.gwt.user.client.rpc.SerializationException

loadRuleListForCategories

@WebRemote
@Restrict(value="#{identity.loggedIn}")
public PageResponse<CategoryPageRow> loadRuleListForCategories(CategoryPageRequest request)
                                                        throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: CategoryService
Return a list of Assets by category.

Specified by:
loadRuleListForCategories in interface CategoryService
Parameters:
request - Request specific details
Throws:
com.google.gwt.user.client.rpc.SerializationException

removeCategory

@WebRemote
@Restrict(value="#{identity.loggedIn}")
public void removeCategory(String categoryPath)
                    throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: CategoryService
This will remove a category. A category must have no current assets linked to it, or else it will not be able to be removed.

Specified by:
removeCategory in interface CategoryService
Parameters:
categoryPath - The full path to the category. Any sub categories will also be removed.
Throws:
com.google.gwt.user.client.rpc.SerializationException - For when it all goes horribly wrong.


Copyright © 2001-2011 JBoss Inc.. All Rights Reserved.