Package com.dotmarketing.portlets.structure.model

Examples of com.dotmarketing.portlets.structure.model.Structure


   * @return The field found
   * @deprecated This method was deprecated because it uses the presentation name of the field
   *              we encourage the use of the logical name of the field instead @see getFieldByLogicalName
   */
  public Field getFieldByInode(String structureInode, String fieldName) {
    Structure st = StructureCache.getStructureByInode(structureInode);
    return getFieldByName(st, fieldName);
  }
View Full Code Here


   * @param structureType The structure type name
   * @param fieldName  The presentation name of the field
   * @return The field found, an empty field if it wasn't found
   */
  public Field getFieldByLogicalName(String structureType, String fieldName) {
    @SuppressWarnings("deprecation")
    Structure st = StructureCache.getStructureByType(structureType);
    return getFieldByLogicalName(st, fieldName);
  }
View Full Code Here

   * @param structureInode The structure inode
   * @param fieldName  The presentation name of the field
   * @return The field found, an empty field if it wasn't found
   */
  public Field getFieldByLogicalNameAndInode(String structureInode, String fieldName) {
    Structure st = StructureCache.getStructureByInode(structureInode);
    return getFieldByLogicalName(st, fieldName);
  }
View Full Code Here

   * @param content
   * @return
   * @deprecated Try using the #getContentDetail or #getContentDetailByIdentifier macros to retrieve the fields of a content.
   */
  public Object getFieldValue(String fieldName, Contentlet content) {
    Structure structure = StructureCache.getStructureByInode(content.getStructureInode());
    Field theField = null;
    List<Field> fields = FieldsCache.getFieldsByStructureInode(structure.getInode());
    for (Field field : fields) {
      if (field.getFieldName().equals(fieldName)) {
        theField = field;
        break;
      }
View Full Code Here

   * @deprecated This method was deprecated because it uses the presentation name of the field
   *              we encourage the use of the logical name of the field instead @see getFieldByLogicalName
   */
  public List<Contentlet> getContents(String structureType, String categoryName) throws DotDataException, DotSecurityException {
    Category category = categoryAPI.findByName(categoryName, user, true);
    Structure structure = StructureCache.getStructureByType(structureType);
    StringBuffer buffy = new StringBuffer();
    buffy.append("+live:true +deleted:false +structureInode:" + structure.getInode() + " +c" + category.getInode() + "c:on");
    return conAPI.search(buffy.toString(), 0, -1, "mod_date", user, true);
  }
View Full Code Here

  @SuppressWarnings({ "rawtypes", "deprecation", "unchecked" })
  public HashMap searchWithLuceneQuery(String structureType, String luceneCondition, String sortBy, String pageStr,
      String rowsPerPage) throws DotSecurityException {

    String structInode = "";
    Structure structure = null;
    try {
      structInode = structureType;
      structure = new Structure();
      structure.setInode(structInode);
    } catch (Exception e) {
      structure = StructureCache.getStructureByType(structureType);
    }

    Logger.debug(ContentsWebAPI.class, "search: luceneCondition: " + luceneCondition + ", sortBy: " + sortBy
View Full Code Here

    /*
     * We avoid a db hit if we pass the structure inode
     */

    String structInode = "";
    Structure structure = null;
    try {
      structInode = structureType;
      structure = new Structure();
      structure.setInode(structInode);
    } catch (Exception e) {
      structure = StructureCache.getStructureByType(structureType);
    }
    //luceneCondition = LuceneUtils.findAndReplaceQueryDatesLegacy(luceneCondition);
    int offSet = 0;
View Full Code Here

  public List<Relationship> getRelationshipsOfStructure(long structureInode, boolean hasParent) {
    return getRelationshipsOfStructure(((Long) structureInode).toString(), hasParent);
  }
  @Deprecated
  public List<Relationship> getRelationshipsOfStructure(String structureInode, boolean hasParent) {
    Structure st = (Structure) InodeFactory.getInode(structureInode, Structure.class);
    return RelationshipFactory.getAllRelationshipsByStructure(st, hasParent);
  }
View Full Code Here

   * @param relationship
   *            The relationship
   * @return true If the contentlet has the role of parent, false otherwise
   */
  public static boolean isParentOfTheRelationship(Contentlet contentlet, Relationship relationship) {
    Structure contStructure = contentlet.getStructure();
    return relationship.getParentStructure().getInode().equalsIgnoreCase(contStructure.getInode());
  }
View Full Code Here

   * @param relationship
   *            The relationship
   * @return true If the contentlet has the role of child, false otherwise
   */
  public static boolean isChildOfTheRelationship(Contentlet contentlet, Relationship relationship) {
    Structure contStructure = contentlet.getStructure();
    return relationship.getChildStructure().getInode().equalsIgnoreCase(contStructure.getInode());
  }
View Full Code Here

TOP

Related Classes of com.dotmarketing.portlets.structure.model.Structure

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.