Structure contentStructure = contentlet.getStructure();
String relName = Config.getStringProperty("pop."+contentStructure.getVelocityVarName()+".relationship.name");
if(!UtilMethods.isSet(relName))
return new ContentletRelationships(contentlet);
Relationship relationship = new Relationship();
relationship = RelationshipFactory.getRelationshipByRelationTypeValue(relName);
if(relationship == null)
return new ContentletRelationships(contentlet);
ContentletRelationships relationshipsData = new ContentletRelationships(contentlet);
List<ContentletRelationshipRecords> relationshipsRecords = new ArrayList<ContentletRelationshipRecords> ();
relationshipsData.setRelationshipsRecords(relationshipsRecords);
Structure parentStr = relationship.getParentStructure();
Structure childStr = relationship.getChildStructure();
if(contentStructure.equals(childStr)){
String messageIdFieldVarNm = Config.getStringProperty("pop."+contentStructure.getVelocityVarName()+".relationship.parent.messageId");
if(!UtilMethods.isSet(messageIdFieldVarNm) && parentStr.equals(childStr)){
messageIdFieldVarNm = Config.getStringProperty("pop."+contentStructure.getVelocityVarName()+".messageId");
}
if(!UtilMethods.isSet(messageIdFieldVarNm))
return new ContentletRelationships(contentlet);
List<Contentlet> searchResults = new ArrayList<Contentlet>();
String luceneQuery = "";
String ref = (String)email.get("References");
String[] references = parseReferences(ref);