Codota Logo
CmsCategoryService.readCategories
Code IndexAdd Codota to your IDE (free)

How to use
readCategories
method
in
org.opencms.relations.CmsCategoryService

Best Java code snippets using org.opencms.relations.CmsCategoryService.readCategories (Showing top 12 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: org.opencms/opencms-solr

/**
 * Reads all first level categories, including sub categories if needed.<p> 
 * 
 * @param cms the current cms context
 * @param includeSubCats flag to indicate if sub categories should also be read
 * 
 * @return a list of {@link CmsCategory} objects
 * 
 * @throws CmsException if something goes wrong
 * 
 * @deprecated use {@link #readCategories(CmsObject, String, boolean, String)} instead
 */
public List readAllCategories(CmsObject cms, boolean includeSubCats) throws CmsException {
  return readCategories(cms, null, includeSubCats, null);
}
origin: org.opencms/opencms-core

  categories = catService.readCategories(cms, "", true, sitePath);
  result = buildCategoryTree(cms, categories);
} else {
origin: org.opencms/opencms-solr

/**
 * Returns all sub categories of the given category.<p>
 * 
 * @param cms the current cms context
 * @param categoryPath the path of the category to get the sub categories for
 * @param includeSubCats if to include sub-subcategories
 * 
 * @return a list of {@link CmsCategory} objects
 * 
 * @throws CmsException if something goes wrong
 * 
 * @deprecated use {@link #readCategories(CmsObject, String, boolean, String)} instead
 */
public List readSubCategories(CmsObject cms, String categoryPath, boolean includeSubCats) throws CmsException {
  return readCategories(cms, categoryPath, includeSubCats, null);
}
origin: org.opencms/opencms-solr

/**
 * @see org.opencms.workplace.commons.A_CmsResourceCategoriesList#getCategories()
 */
@Override
protected List getCategories() throws CmsException {
  List resourceRelations = getResourceCategories();
  List result = getCategoryService().readCategories(getJsp().getCmsObject(), null, true, getParamResource());
  Iterator itResourceRelations = resourceRelations.iterator();
  while (itResourceRelations.hasNext()) {
    CmsCategory category = (CmsCategory)itResourceRelations.next();
    if (result.contains(category)
      && resourceRelations.containsAll(getCategoryService().readCategories(
        getJsp().getCmsObject(),
        category.getPath(),
        true,
        getParamResource()))) {
      result.remove(category);
    }
  }
  return result;
}
origin: org.opencms/org.opencms.workplace

/**
 * @see org.opencms.workplace.commons.A_CmsResourceCategoriesList#getCategories()
 */
@Override
protected List<CmsCategory> getCategories() throws CmsException {
  List<CmsCategory> resourceRelations = getResourceCategories();
  List<CmsCategory> result = getCategoryService().readCategories(
    getJsp().getCmsObject(),
    null,
    true,
    getParamResource());
  Iterator<CmsCategory> itResourceRelations = resourceRelations.iterator();
  while (itResourceRelations.hasNext()) {
    CmsCategory category = itResourceRelations.next();
    if (result.contains(category)
      && resourceRelations.containsAll(
        getCategoryService().readCategories(
          getJsp().getCmsObject(),
          category.getPath(),
          true,
          getParamResource()))) {
      result.remove(category);
    }
  }
  return result;
}
origin: org.opencms/opencms-core

@Override
public Object transform(Object categoryPath) {
  try {
    List<CmsCategory> categories = CmsCategoryService.getInstance().readCategories(
      m_cms,
      (String)categoryPath,
      true,
      m_cms.getRequestContext().getUri());
    CmsJspCategoryAccessBean result = new CmsJspCategoryAccessBean(
      categories,
      (String)categoryPath);
    return result;
  } catch (CmsException e) {
    LOG.warn(e.getLocalizedMessage(), e);
    return null;
  }
}
origin: org.opencms/opencms-solr

  foundCategories = catService.readCategories(getCms(), "", true, editedResource);
} catch (CmsException e) {
origin: org.opencms/opencms-core

  foundCategories = catService.readCategories(getCms(), "", true, editedResource);
} catch (CmsException e) {
origin: org.opencms/opencms-solr

String referencePath = cms.getSitePath(getResource(cms, param));
String startingCat = getStartingCategory(cms, referencePath);
List cats = CmsCategoryService.getInstance().readCategories(cms, startingCat, true, referencePath);
int baseLevel;
if (CmsStringUtil.isEmptyOrWhitespaceOnly(startingCat)) {
origin: org.opencms/opencms-core

List<CmsCategory> cats = CmsCategoryService.getInstance().readCategories(
  cms,
  startingCat,
origin: org.opencms/opencms-core

CmsCategoryService.getInstance().readCategory(cms, catPath, refPath);
if (((CmsCategoryWidget)widget).isOnlyLeafs()) {
  if (!CmsCategoryService.getInstance().readCategories(cms, catPath, false, refPath).isEmpty()) {
    errorHandler.addError(
      value,
origin: org.opencms/opencms-solr

CmsCategoryService.getInstance().readCategory(cms, catPath, refPath);
if (((CmsCategoryWidget)widget).isOnlyLeafs()) {
  if (!CmsCategoryService.getInstance().readCategories(cms, catPath, false, refPath).isEmpty()) {
    errorHandler.addError(value, Messages.get().getBundle(value.getLocale()).key(
      Messages.GUI_CATEGORY_CHECK_NOLEAF_ERROR_0));
org.opencms.relationsCmsCategoryServicereadCategories

Javadoc

Returns all categories given some search parameters.

Popular methods of CmsCategoryService

  • addResourceToCategory
    Adds a resource identified by the given resource name to the given category. The resource has to be
  • getInstance
    Returns the singleton instance.
  • readCategory
    Reads all categories identified by the given category path for the given reference path.
  • readResourceCategories
    Reads the categories for a resource.
  • removeResourceFromCategory
    Removes a resource identified by the given resource name from the given category. The resource has t
  • repairRelations
    Repairs broken category relations. This could be caused by renaming/moving a category folder, or cha
  • <init>
  • clearCategoriesForResource
    Removes the given resource from all categories.
  • createCategory
    Creates a new category. Will use the same category repository as the parent if specified, or the clo
  • getCategory
    Creates a category from the given resource.
  • getCategoryRepositories
    Returns all category repositories for the given reference path.
  • getRepositoryBaseFolderName
    Returns the category repositories base folder name.
  • getCategoryRepositories,
  • getRepositoryBaseFolderName,
  • internalCategoryRootPath,
  • internalReadResourceCategories,
  • internalReadSubCategories,
  • readCategoryResources,
  • deleteCategory,
  • moveCategory,
  • readCategoriesForRepositories

Popular in Java

  • Reactive rest calls using spring rest template
  • setRequestProperty (URLConnection)
  • requestLocationUpdates (LocationManager)
  • runOnUiThread (Activity)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • Properties (java.util)
    The Properties class represents a persistent set of properties. The Properties can be saved to a st
  • Stack (java.util)
    The Stack class represents a last-in-first-out (LIFO) stack of objects. It extends class Vector with
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • JTable (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now