com.trendmicro.grid.acl.l0
Interface PublicCategoryService

All Superinterfaces:
Service

@PublicRequestContext
@WebServlet(value="/ws/level-0/categories")
public interface PublicCategoryService
extends Service

Defines public reachable services to query categories and views.

Version:
1.0
Author:
Juergen_Kellerer, 2010-04-23

Method Summary
 CategoryView getCategoryView(String locale, String viewName)
           
 List<String> getCategoryViewNames(String locale, String targetIdentifier)
          Returns the names of available category views,
 List<CategoryView> getCategoryViews(String locale, BatchCollection<String> viewNames)
          Returns the category views for the given view names.
 List<Category> getDeclaredCategories()
          Returns all declared, plain categories (without any view or child relationship and without any locale related filtering).
 List<Category> getPlainCategories(String locale)
          Returns all plain categories (without any view or child relationship).
 Category getPlainCategory(String locale, String categoryName)
          Returns the plain category information (without any view or child relationship).
 FileIdentiferListPage getReferencedFiles(String categoryName, int pageNumber)
          Is a shorthand for PublicFileService.getMatchingFiles(String, String, int) used with the expressions returned from getPlainCategory(String, String).
 FileIdentiferListPage getReferencedFilesInRange(String categoryName, Range range, int pageNumber)
          Is a shorthand for PublicFileService.getMatchingFilesInRange(String, String, Range, int) used with the expressions returned from getPlainCategory(String, String).
 NameListPage getReferencedPackageNames(String categoryName, int pageNumber)
          Is a shorthand for PublicPackageService.getMatchingPackageNames(String, String, int) used with the expressions returned from getPlainCategory(String, String).
 NameListPage getReferencedPackageNamesInRange(String categoryName, Range range, int pageNumber)
          Is a shorthand for PublicPackageService.getMatchingPackageNamesInRange(String, String, Range, int) used with the expressions returned from getPlainCategory(String, String).
 NameList getReferencingCategoryNamesOnFile(FileIdentifier fileIdentifier)
          Returns the category names that reference this identifier.
 List<NameList> getReferencingCategoryNamesOnFileInformationList(BatchCollection<FileInformation> informationList)
          Returns the category names that reference this file information list.
 List<NameList> getReferencingCategoryNamesOnFiles(BatchCollection<FileIdentifier> fileIdentifiers)
          Returns the category names that reference these identifiers.
 NameList getReferencingCategoryNamesOnPackageById(FileIdentifier fileIdentifier)
          Returns the category names that reference this package selected by its file identifier.
 NameList getReferencingCategoryNamesOnPackageByName(String packageName)
          Returns the category names that reference this package selected by its name.
 List<NameList> getReferencingCategoryNamesOnPackageInformationList(BatchCollection<PackageInformation> informationList)
          Returns the category names that reference this package information list.
 List<NameList> getReferencingCategoryNamesOnPackagesById(BatchCollection<FileIdentifier> fileIdentifiers)
          Returns the category names that reference these packages selected by their file identifiers.
 List<NameList> getReferencingCategoryNamesOnPackagesByName(BatchCollection<String> packageNames)
          Returns the category names that reference these packages selected by their names.
 

Method Detail

getCategoryViewNames

@RequiredRoles(value="run.categorization.queries")
List<String> getCategoryViewNames(String locale,
                                                     String targetIdentifier)
                                  throws AuthenticationException
Returns the names of available category views,

Parameters:
locale - The locale (language & country) of the requester (views are regional!).
targetIdentifier - Optional identifier specifying the requesting target application type. Is set to "default" if left empty or if it is not existing.
Returns:
A list of available view names.
Throws:
AuthenticationException - In case of this service requires authentication and the current user session is not authenticated or doesn't have the right to access the service.

getCategoryView

@RequiredRoles(value="run.categorization.queries")
CategoryView getCategoryView(String locale,
                                                String viewName)
                             throws AuthenticationException
Parameters:
locale - The locale (language & country) of the requester.
viewName - The name of the view to return.
Returns:
The category view for the given name or 'null' if not existing.
Throws:
AuthenticationException - In case of this service requires authentication and the current user session is not authenticated or doesn't have the right to access the service.

getCategoryViews

@ResponseWrapper(className="com.trendmicro.grid.acl.l0.wrappers.GetCategoryViewsResponse")
@RequiredRoles(value="run.categorization.queries")
List<CategoryView> getCategoryViews(String locale,
                                                                                BatchCollection<String> viewNames)
                                    throws AuthenticationException
Returns the category views for the given view names.

Parameters:
locale - The locale (language & country) of the requester.
viewNames - A list of view names.
Returns:
The category views for the given names.
Throws:
AuthenticationException - In case of this service requires authentication and the current user session is not authenticated or doesn't have the right to access the service.

getPlainCategory

@RequiredRoles(value="run.categorization.queries")
Category getPlainCategory(String locale,
                                             String categoryName)
                          throws AuthenticationException
Returns the plain category information (without any view or child relationship).

Parameters:
locale - The locale (language & country) of the requester.
categoryName - The name of the category to return.
Returns:
The plain category (without any view or child relationship).
Throws:
AuthenticationException - In case of this service requires authentication and the current user session is not authenticated or doesn't have the right to access the service.

getPlainCategories

@RequiredRoles(value="run.categorization.queries")
List<Category> getPlainCategories(String locale)
                                  throws AuthenticationException
Returns all plain categories (without any view or child relationship).

Parameters:
locale - The locale (language & country) of the requester.
Returns:
All plain categories (without any view or child relationship).
Throws:
AuthenticationException - In case of this service requires authentication and the current user session is not authenticated or doesn't have the right to access the service.

getDeclaredCategories

@RequiredRoles(value="run.categorization.queries")
List<Category> getDeclaredCategories()
                                     throws AuthenticationException
Returns all declared, plain categories (without any view or child relationship and without any locale related filtering).

Display names are returned using the ENGLISH locale.

Important Note: There must not be 2 categories with the same name but different locale and different tag query expression. Only the display name may be non-unique.

Returns:
All declared categories.
Throws:
AuthenticationException - In case of this service requires authentication and the current user session is not authenticated or doesn't have the right to access the service.

getReferencedFiles

@RequiredRoles(value={"run.categorization.queries","run.tag.matching.queries"})
FileIdentiferListPage getReferencedFiles(String categoryName,
                                                            int pageNumber)
                                         throws AuthenticationException
Is a shorthand for PublicFileService.getMatchingFiles(String, String, int) used with the expressions returned from getPlainCategory(String, String).

Parameters:
categoryName - the category name identifying the category to return the referenced file for.
pageNumber - the page number to return.
Returns:
a identifier list page.
Throws:
AuthenticationException - In case of this service requires authentication and the current user session is not authenticated or doesn't have the right to access the service.

getReferencedFilesInRange

@RequiredRoles(value={"run.categorization.queries","run.tag.matching.queries"})
FileIdentiferListPage getReferencedFilesInRange(String categoryName,
                                                                   Range range,
                                                                   int pageNumber)
                                                throws AuthenticationException
Is a shorthand for PublicFileService.getMatchingFilesInRange(String, String, Range, int) used with the expressions returned from getPlainCategory(String, String).

Parameters:
categoryName - the category name identifying the category to return the referenced file for.
range - the range used for filtering by date.
pageNumber - the page number to return.
Returns:
a identifier list page.
Throws:
AuthenticationException - In case of this service requires authentication and the current user session is not authenticated or doesn't have the right to access the service.

getReferencedPackageNames

@RequiredRoles(value={"run.categorization.queries","run.tag.matching.queries","run.package.queries"})
NameListPage getReferencedPackageNames(String categoryName,
                                                          int pageNumber)
                                       throws AuthenticationException
Is a shorthand for PublicPackageService.getMatchingPackageNames(String, String, int) used with the expressions returned from getPlainCategory(String, String).

Parameters:
categoryName - the category name identifying the category to return the referenced file for.
pageNumber - the page number to return.
Returns:
a identifier list page.
Throws:
AuthenticationException - In case of this service requires authentication and the current user session is not authenticated or doesn't have the right to access the service.

getReferencedPackageNamesInRange

@RequiredRoles(value={"run.categorization.queries","run.tag.matching.queries","run.package.queries"})
NameListPage getReferencedPackageNamesInRange(String categoryName,
                                                                 Range range,
                                                                 int pageNumber)
                                              throws AuthenticationException
Is a shorthand for PublicPackageService.getMatchingPackageNamesInRange(String, String, Range, int) used with the expressions returned from getPlainCategory(String, String).

Parameters:
categoryName - the category name identifying the category to return the referenced file for.
range - the range used for filtering by date.
pageNumber - the page number to return.
Returns:
a identifier list page.
Throws:
AuthenticationException - In case of this service requires authentication and the current user session is not authenticated or doesn't have the right to access the service.

getReferencingCategoryNamesOnFile

@RequiredRoles(value={"run.categorization.queries","run.complex.queries"})
NameList getReferencingCategoryNamesOnFile(FileIdentifier fileIdentifier)
                                           throws AuthenticationException
Returns the category names that reference this identifier.

Parameters:
fileIdentifier - the identifier to test against categorization.
Returns:
the category names that reference this identifier.
Throws:
AuthenticationException - In case of this service requires authentication and the current user session is not authenticated or doesn't have the right to access the service.

getReferencingCategoryNamesOnFiles

@RequiredRoles(value={"run.categorization.queries","run.complex.queries"})
List<NameList> getReferencingCategoryNamesOnFiles(BatchCollection<FileIdentifier> fileIdentifiers)
                                                  throws AuthenticationException
Returns the category names that reference these identifiers.

Parameters:
fileIdentifiers - the identifiers to test against categorization.
Returns:
the category names that reference these identifiers.
Throws:
AuthenticationException - In case of this service requires authentication and the current user session is not authenticated or doesn't have the right to access the service.

getReferencingCategoryNamesOnPackageById

@RequiredRoles(value={"run.categorization.queries","run.complex.queries"})
NameList getReferencingCategoryNamesOnPackageById(FileIdentifier fileIdentifier)
                                                  throws AuthenticationException
Returns the category names that reference this package selected by its file identifier.

Parameters:
fileIdentifier - the identifier to test against categorization.
Returns:
the category names that reference this identifier.
Throws:
AuthenticationException - In case of this service requires authentication and the current user session is not authenticated or doesn't have the right to access the service.

getReferencingCategoryNamesOnPackagesById

@RequiredRoles(value={"run.categorization.queries","run.complex.queries"})
List<NameList> getReferencingCategoryNamesOnPackagesById(BatchCollection<FileIdentifier> fileIdentifiers)
                                                         throws AuthenticationException
Returns the category names that reference these packages selected by their file identifiers.

Parameters:
fileIdentifiers - the identifiers to test against categorization.
Returns:
the category names that reference these identifiers.
Throws:
AuthenticationException - In case of this service requires authentication and the current user session is not authenticated or doesn't have the right to access the service.

getReferencingCategoryNamesOnPackageByName

@RequiredRoles(value={"run.categorization.queries","run.complex.queries"})
NameList getReferencingCategoryNamesOnPackageByName(String packageName)
                                                    throws AuthenticationException
Returns the category names that reference this package selected by its name.

Parameters:
packageName - the name to test against categorization.
Returns:
the category names that reference this name.
Throws:
AuthenticationException - In case of this service requires authentication and the current user session is not authenticated or doesn't have the right to access the service.

getReferencingCategoryNamesOnPackagesByName

@RequiredRoles(value={"run.categorization.queries","run.complex.queries"})
List<NameList> getReferencingCategoryNamesOnPackagesByName(BatchCollection<String> packageNames)
                                                           throws AuthenticationException
Returns the category names that reference these packages selected by their names.

Parameters:
packageNames - the names to test against categorization.
Returns:
the category names that reference these names.
Throws:
AuthenticationException - In case of this service requires authentication and the current user session is not authenticated or doesn't have the right to access the service.

getReferencingCategoryNamesOnFileInformationList

@RequiredRoles(value={"run.categorization.queries","run.complex.queries"})
List<NameList> getReferencingCategoryNamesOnFileInformationList(BatchCollection<FileInformation> informationList)
                                                                throws AuthenticationException
Returns the category names that reference this file information list.

Parameters:
informationList - the information list to test against categorization.
Returns:
the category names that reference this list.
Throws:
AuthenticationException - In case of this service requires authentication and the current user session is not authenticated or doesn't have the right to access the service.

getReferencingCategoryNamesOnPackageInformationList

@RequiredRoles(value={"run.categorization.queries","run.complex.queries"})
List<NameList> getReferencingCategoryNamesOnPackageInformationList(BatchCollection<PackageInformation> informationList)
                                                                   throws AuthenticationException
Returns the category names that reference this package information list.

Parameters:
informationList - the information list to test against categorization.
Returns:
the category names that reference this list.
Throws:
AuthenticationException - In case of this service requires authentication and the current user session is not authenticated or doesn't have the right to access the service.