/** * Get tag service. * * @return tag service */ public static INuxeoTagService getTagService() { INuxeoService nuxeoService = getNuxeoService(); return nuxeoService.getTagService(); }
/** * Get forms service. * * @return forms service */ public static IFormsService getFormsService() { INuxeoService nuxeoService = getNuxeoService(); return nuxeoService.getFormsService(); }
/** * Gets the nuxeo public base uri. * * @return the nuxeo public base uri */ public URI getNuxeoPublicBaseUri() { if (this.nuxeoBaseURI == null) { this.nuxeoBaseURI = NuxeoConnectionProperties.getPublicBaseUri(); } return this.nuxeoBaseURI; }
/** * Instantiates a new async command bean. * * @param origCtx the orig ctx * @param cmd the cmd */ protected AsyncCommandBean( NuxeoCommandContext origCtx, INuxeoServiceCommand cmd){ ctx = new NuxeoCommandContext(origCtx.getPortletContext()); ctx.setAuthType(origCtx.getAuthType()); ctx.setAuthProfil(origCtx.getAuthProfil()); command = cmd; }
/** * Get the user avatar (acceded from portlets). * * @param username * @return a link to the avatar * @throws CMSException */ public Link getUserAvatar(String username) throws CMSException { return getNuxeoCMSService().getCMSCustomizer().getUserAvatar(username); }
/** * Get CMS item type. * * @param type document type name * @return CMS item type */ private DocumentType getType(String type) { // CMS customizer INuxeoCustomizer cmsCustomizer = this.nuxeoService.getCMSCustomizer(); // CMS item types Map<String, DocumentType> types = cmsCustomizer.getDocumentTypes(); return types.get(type); }
/** * Get CMS item types. * * @return CMS item types */ public Map<String, DocumentType> getCMSItemTypes() { INuxeoService nuxeoService = this.getNuxeoCMSService(); return nuxeoService.getCMSCustomizer().getCMSItemTypes(); }
public Link getLinkFromNuxeoURL(String url, String displayContext) { // Nuxeo service INuxeoService nuxeoService = this.getNuxeoCMSService(); // Nuxeo customizer INuxeoCustomizer nuxeoCustomizer = nuxeoService.getCMSCustomizer(); // Customizer call return nuxeoCustomizer.getLinkFromNuxeoURL(this.getCMSCtx(), url, displayContext); }
/** * Gets the content web id path ( like /_id/domain-def-jss/publistatfaq.html) * * if no webId is defined, returns original path * * @return the content web id path */ public String getContentWebIdPath() { INuxeoService nuxeoService = this.getNuxeoCMSService(); String path = nuxeoService.getCMSCustomizer().getContentWebIdPath(this.getCMSCtx()); return path; }
/** * Get Nuxeo comments service instance. * * @return Nuxeo comments service instance */ public INuxeoCommentsService getNuxeoCommentsService() { try { INuxeoService nuxeoService = this.getNuxeoCMSService(); return nuxeoService.getCMSCustomizer().getNuxeoCommentsService(); } catch (Exception e) { throw this.wrapNuxeoException(e); } }
/** * Insert content menubar items. * * @throws Exception the exception */ public void insertContentMenuBarItems() { try { INuxeoService nuxeoService = this.getNuxeoCMSService(); nuxeoService.getCMSCustomizer().formatContentMenuBar(this.getCMSCtx()); } catch (Exception e) { throw this.wrapNuxeoException(e); } }
/** * Transform Nuxeo link URL * * @param link Nuxeo link URL * @return transformed Nuxeo link URL */ public String transformNuxeoLink(String link) { try { INuxeoService nuxeoService = this.getNuxeoCMSService(); return nuxeoService.getCMSCustomizer().transformLink(this.getCMSCtx(), link); } catch (Exception e) { throw this.wrapNuxeoException(e); } }
/** * Transform html content from nuxeo (note:note) * * @param htmlContent the html content * @return the string * @throws Exception the exception */ public String transformHTMLContent(String htmlContent) { try { INuxeoService nuxeoService = this.getNuxeoCMSService(); return nuxeoService.getCMSCustomizer().transformHTMLContent(this.getCMSCtx(), htmlContent); } catch (Exception e) { throw this.wrapNuxeoException(e); } }
public boolean equals(Object obj) { if(this == obj) { return true; } if( ! (obj instanceof AsyncCommandBean)) return false; return getCommand().getId().equals(((AsyncCommandBean) obj).getCommand().getId()); } }
/** * Gets the nuxeo connection props. * * @return the nuxeo connection props */ public NuxeoConnectionProperties getNuxeoConnectionProps() { if (this.nuxeoConnection == null) { this.nuxeoConnection = new NuxeoConnectionProperties(); } return this.nuxeoConnection; }
/** * Constructor. */ public ToutaticeSimpleTag() { super(); // Tag service this.tagService = NuxeoServiceFactory.getTagService(); }
@Override public int hashCode() { int hc = command.getId().hashCode(); return hc; }
/** * Stop nuxeo command service. * * @param ctx the ctx * @throws Exception the exception */ public static void stopNuxeoCommandService(PortletContext ctx) throws Exception { INuxeoCommandService nuxeoService = (INuxeoCommandService) ctx.getAttribute("nuxeoCommandService"); if( nuxeoService != null) nuxeoService.destroy(); }
/** * Start nuxeo command service. * * @param ctx the ctx * @throws Exception the exception */ public static void startNuxeoCommandService(PortletContext ctx) throws Exception { INuxeoService nuxeoService = (INuxeoService)ctx.getAttribute("NuxeoService"); INuxeoCommandService nuxeoCommandService = nuxeoService.startNuxeoCommandService(ctx); ctx.setAttribute("nuxeoCommandService", nuxeoCommandService); }
/** * Stop nuxeo service. * * @throws Exception the exception */ public void stopNuxeoService() { try { NuxeoCommandServiceFactory.stopNuxeoCommandService(this.getPortletCtx()); } catch (Exception e) { throw this.wrapNuxeoException(e); } }