/** * {@inheritDoc} */ @Override public String createUuid() { return this.idManager.createUuid(); }
public BasicCitationCollection() { m_id = m_idManager.createUuid(); }
@Override public void execute(JobExecutionContext context) throws JobExecutionException { if (idManager != null) { log.info("Autowiring worked, generated ID {}", idManager.createUuid()); } else { log.info("IdManager was not autowired :-("); } } }
@Override public void execute(JobExecutionContext context) throws JobExecutionException { if (idManager != null) { log.info("Autowiring worked, generated ID {}", idManager.createUuid()); } else { log.info("IdManager was not autowired :-("); } } }
public static java.lang.String createUuid() { org.sakaiproject.id.api.IdManager manager = getInstance(); if (manager == null) return null; return manager.createUuid(); } }
public static java.lang.String createUuid() { org.sakaiproject.id.api.IdManager manager = getInstance(); if (manager == null) return null; return manager.createUuid(); } }
@Override @Transactional(propagation = REQUIRES_NEW) public String createDelayedInvocation(Instant instant, String componentId, String opaqueContext) { String uuid = m_idManager.createUuid(); createDelayedInvocation(instant, componentId, opaqueContext, uuid); return uuid; }
/** * Construct a citation not marked as temporary of a particular type. * * @param mediatype */ public BasicCitation(String mediatype) { m_id = m_idManager.createUuid(); m_citationProperties = new Hashtable(); m_urls = new Hashtable(); setType(mediatype); }
public String addCustomUrl(String label, String url) { UrlWrapper wrapper = new UrlWrapper(label, url); String id = m_idManager.createUuid(); m_urls.put(id, wrapper); return id; }
@Override @Transactional(propagation = REQUIRES_NEW) public String createDelayedInvocation(Instant instant, String componentId, String opaqueContext) { String uuid = m_idManager.createUuid(); createDelayedInvocation(instant, componentId, opaqueContext, uuid); return uuid; }
/** * Make sure we have a good uuid for a user record. If id is specified, use that. Otherwise get one from the provider or allocate a uuid. * * @param id * The proposed id. * @param eid * The proposed eid. * @return The id to use as the User's uuid. */ protected String assureUuid(String id, String eid) { // if we are not using separate id and eid, return the eid if (!m_separateIdEid) return eid; if (id != null) return id; // TODO: let the provider have a chance to set this? -ggolden // allocate a uuid id = idManager().createUuid(); return id; }
/** * @param b */ public BasicCitationCollection(boolean temporary) { m_order = new TreeSet<String>(m_comparator); m_temporary = temporary; if (temporary) { m_serialNumber = nextSerialNumber(); } else { m_id = m_idManager.createUuid(); } }
/** * @inheritDoc */ public Session startSession() { String id = idManager().createUuid(); return startSession(id); }
public String addCustomUrl(String label, String url, String prefixRequest) { UrlWrapper wrapper = new UrlWrapper(label, url, getPrefixBoolean(prefixRequest)); String id = m_idManager.createUuid(); m_urls.put(id, wrapper); return id; }
public void save(Citation citation) { if (citation instanceof BasicCitation && ((BasicCitation) citation).isTemporary()) { ((BasicCitation) citation).m_id = m_idManager.createUuid(); ((BasicCitation) citation).m_temporary = false; ((BasicCitation) citation).m_serialNumber = null; } this.m_storage.saveCitation(citation); }
/** * Set the file path for this resource * * @param time * The time on which to based the path. */ protected void setFilePath(Time time) { // compute file path: use now in ms mod m_bodyVolumes.length to pick a volume from m_bodyVolumes (if defined) // add /yyyy/DDD/HH year / day of year / hour / and a unique id for the final file name. // Don't include the body path. String volume = "/"; if ((m_bodyVolumes != null) && (m_bodyVolumes.length > 0)) { volume += m_bodyVolumes[(int) (Math.abs(time.getTime()) % ((long) m_bodyVolumes.length))]; volume += "/"; } m_filePath = volume + time.toStringFilePath() + idManager.createUuid(); }
/** * Construct using a tool registration for default information. * * @param reg * The tool registration. * @param page * The page in which this tool lives. */ protected BaseToolConfiguration(BaseSiteService siteService, SitePage page) { super(siteService.idManager().createUuid(), null, null, null, null, null); this.siteService = siteService; m_page = page; m_custom_title = getTitleCustom(page); }
/** * Construct using a tool id. * * @param toolId * The tool id. * @param page * The page in which this tool lives. */ protected BaseToolConfiguration(BaseSiteService siteService, String toolId, SitePage page) { super(siteService.idManager().createUuid(), toolId, null, null, null, null); this.siteService = siteService; m_page = page; m_custom_title = getTitleCustom(page); setPageCategory(); }
/** * For a given id, return its UUID (creating it if it does not already exist) */ public String getUuid(String id) { /* * Note: Content Hosting Handler This will only operate on local resources The only thing that may not work is move. */ String uuid = null; uuid = findUuid(id); if (uuid != null) return uuid; // UUID not found, so create one and store it IdManager uuidManager = (IdManager) ComponentManager.get(IdManager.class); uuid = uuidManager.createUuid(); setUuidInternal(id, uuid); return uuid; }
public ValidationAccount createValidationAccount(String userRef, String newUserId) { ValidationAccount account = new ValidationAccount(); account.setUserId(userRef); account.setValidationToken(idManager.createUuid()); account.setValidationsSent(1); account.setAccountStatus(ValidationAccount.ACCOUNT_STATUS_USERID_UPDATE); if(StringUtils.isNotBlank(newUserId)){ account.setEid(newUserId); } sendEmailTemplate(account, newUserId); account = saveValidationAccount(account); return account; }