private List < CmsResource > getDetailContainerResources ( CmsObject cms , CmsResource res ) throws CmsException { CmsRelationFilter filter = CmsRelationFilter . relationsFromStructureId ( res . getStructureId ( ) ) . filterType ( CmsRelationType . DETAIL_ONLY ) ; List < CmsResource > result = Lists . newArrayList ( ) ; List < CmsRelation > relations = cms . readRelations ( filter ) ; for ( CmsRelation relation : relations ) { try { result . add ( relation . getTarget ( cms , CmsResourceFilter . ALL ) ) ; } catch ( Exception e ) { LOG . error ( e . getLocalizedMessage ( ) , e ) ; } } return result ; }
Reads the detail container resources which are connected by relations to the given resource .