@Node(jcrType="hippogallery:exampleAssetSet") public class HippoAsset extends HippoDocument implements HippoAssetBean{ public HippoResourceBean getAsset(){ return getBean("hippogallery:asset", HippoResourceBean.class); } }
private void checkUUID(String uuid) throws ObjectBeanManagerException{ try { UUID.fromString(uuid); } catch (IllegalArgumentException e){ throw new ObjectBeanManagerException("Uuid is not parseable to a valid uuid: '"+uuid+"'"); } }
/** * Saves all pending changes. * @throws ObjectBeanPersistenceException */ public void save() throws ObjectBeanPersistenceException { try { session.save(); } catch (Exception e) { throw new ObjectBeanPersistenceException(e); } }
@Node(jcrType="hippostd:html") public class HippoHtml extends HippoItem implements HippoHtmlBean{ @IndexField(name="hippostdContent") public String getContent(){ return getProperty("hippostd:content"); } }
/** * Invokes {@link javax.jcr.Session#refresh(boolean)}. * @param keepChanges whether to keep changes or not * @throws ObjectBeanPersistenceException */ public void refresh(boolean keepChanges) throws ObjectBeanPersistenceException { try { session.refresh(keepChanges); } catch (Exception e) { throw new ObjectBeanPersistenceException(e); } }
/** * This bean is only to map a hippo:translation to a bean: Normally, you never use this bean at all, as translations are * available through {@link HippoNode#getLocalizedName()} * */ @Node(jcrType="hippo:translation") public class HippoTranslation extends HippoItem { }
@Node(jcrType="hippostd:html") public class HippoHtml extends HippoItem implements HippoHtmlBean{ public String getContent(){ return getProperty("hippostd:content"); } }
/** * [selection:valuelist] > selection:basedocument orderable * + selection:listitem (selection:listitem) multiple */ @Node(jcrType = "selection:valuelist") public class ValueList extends HippoDocument { /** * Get the value list items. */ public List<ValueListItem> getItems() { return getChildBeans("selection:listitem"); } }
/** * hippo:facetselect has the same methods as for hippo:mirror * */ @Node(jcrType="hippo:facetselect") public class HippoFacetSelect extends HippoMirror{ }
@Node(jcrType="hippo:facetresult") public class HippoFacetResult extends HippoFolder implements HippoResultSetBean { public Long getCount() { return this.getProperty(HippoNodeType.HIPPO_COUNT); } }
@Node(jcrType="hippostd:directory") public class HippoDirectory extends HippoFolder{ }
@Node(jcrType="hippostd:fixeddirectory") public class HippoFixedDirectory extends HippoFolder{ }
@Node(jcrType="hippo:facetsearch") public class HippoFacetSearch extends HippoFolder{ }
@Node(jcrType="hippofacnav:facetnavigation") public class HippoFacetNavigation extends HippoFolder { }
/** * [selection:valuelist] > selection:basedocument orderable * + selection:listitem (selection:listitem) multiple */ @Node(jcrType = "selection:valuelist") public class ValueList extends HippoDocument { /** * Get the value list items. */ public List<ValueListItem> getItems() { return getChildBeans("selection:listitem"); } }
@Node(jcrType="hippostd:directory") public class HippoDirectory extends HippoFolder{ }
/** * [selection:listitem] * - selection:key (string) * - selection:label (string) */ @Node(jcrType = "selection:listitem") public class ValueListItem extends HippoItem { public String getKey() { return getProperty("selection:key"); } public String getLabel() { return getProperty("selection:label"); } }
@Node(jcrType="hippostd:fixeddirectory") public class HippoFixedDirectory extends HippoFolder{ }
/** * [selection:listitem] * - selection:key (string) * - selection:label (string) */ @Node(jcrType = "selection:listitem") public class ValueListItem extends HippoItem { public String getKey() { return getProperty("selection:key"); } public String getLabel() { return getProperty("selection:label"); } }