/** * @inheritDoc */ public int[] parseLayoutHints() { try { if (m_layoutHints == null) { return null; } String[] parts = StringUtil.split(m_layoutHints, ","); if (parts.length < 2) { return null; } int[] rv = new int[2]; rv[0] = Integer.parseInt(parts[0]); rv[1] = Integer.parseInt(parts[1]); return rv; } catch (Exception t) { return null; } }
/** * Configuration - set the list of tool ids to be visible, not hidden, even if marked hidden or stealthed. * * @param toolIds * The comma-separated list of tool ids to be visible. */ public void setVisibleTools(String toolIds) { if ((toolIds == null) || (toolIds.length() == 0)) { m_visibleToolIds = null; } else { m_visibleToolIds = new Vector<String>(); String[] items = StringUtil.split(toolIds, ","); for (int i = 0; i < items.length; i++) { m_visibleToolIds.add(items[i]); } } }
/** * Configuration - set the list of tool ids to be "stealthed". A stealthed tool does not show up in a category * list of tools. The list of stealthed tools is set by the Sakai distribution. * If a deployment wishes to override the values set they should use the {@link #setHiddenTools(String)} and * {@link #setVisibleTools(String)} * * @param toolIds * The comma-separated list of tool ids to be stealthed. */ public void setStealthTools(String toolIds) { if ((toolIds == null) || (toolIds.length() == 0)) { m_stealthToolIds = null; } else { m_stealthToolIds = new Vector<String>(); String[] items = StringUtil.split(toolIds, ","); for (int i = 0; i < items.length; i++) { m_stealthToolIds.add(items[i]); } } }
/** * Configuration - set the list of tool ids to be hidden. * * @param toolIds * The comma-separated list of tool ids to be hidden. */ public void setHiddenTools(String toolIds) { if ((toolIds == null) || (toolIds.length() == 0)) { m_hiddenToolIds = null; } else { m_hiddenToolIds = new Vector<String>(); String[] items = StringUtil.split(toolIds, ","); for (int i = 0; i < items.length; i++) { m_hiddenToolIds.add(items[i]); } } }
/** * {@inheritDoc} */ public boolean parseEntityReference(String reference, Reference ref) { // for preferences access if (reference.startsWith(REFERENCE_ROOT)) { String id = null; // we will get null, service, userId String[] parts = StringUtil.split(reference, Entity.SEPARATOR); if (parts.length > 2) { id = parts[2]; } ref.set(APPLICATION_ID, null, id, null, null); return true; } return false; }
/** * @inheritDoc */ public boolean parseEntityReference(String reference, Reference ref) { // for user access if (reference.startsWith(REFERENCE_ROOT)) { String id = null; // we will get null, service, userId String[] parts = StringUtil.split(reference, Entity.SEPARATOR); if (parts.length > 2) { id = parts[2]; } ref.set(APPLICATION_ID, null, id, null, null); return true; } return false; }
/** * @inheritDoc */ public boolean parseEntityReference(String reference, Reference ref) { // for preferences access if (reference.startsWith(REFERENCE_ROOT)) { String id = null; // we will get null, service, user/preferences Id String[] parts = StringUtil.split(reference, Entity.SEPARATOR); if (parts.length > 2) { id = parts[2]; } ref.set(APPLICATION_ID, null, id, null, null); return true; } return false; }
/** * {@inheritDoc} */ public boolean parseEntityReference(String reference, Reference ref) { // for site access if (reference.startsWith(REFERENCE_ROOT)) { String id = null; String container = null; String subType = SITE_SUBTYPE; // we will get null, service, siteId, page | group | tool, page/group/tool id String[] parts = StringUtil.split(reference, Entity.SEPARATOR); if (parts.length > 2) { id = parts[2]; container = id; if (parts.length > 4) { subType = parts[3]; id = parts[4]; } } ref.set(APPLICATION_ID, subType, id, container, null); return true; } return false; }
/** * {@inheritDoc} /access/basiclti/site/12-siteid-456/98-placement-id /access/basiclti/content/ --- content path ---- (Future) */ public boolean parseEntityReference(String reference, Reference ref) { if (reference.startsWith(REFERENCE_ROOT)) { // we will get null, simplelti, site, <context>, <placement> // we will store the context, and the ContentHosting reference in our id field. String id = null; String context = null; String[] parts = StringUtil.split(reference, Entity.SEPARATOR); if ( parts.length == 5 && parts[2].equals("site") ) { context = parts[3]; id = parts[4]; //Should the slashes below be entityseparator // id = "/" + StringUtil.unsplit(parts, 2, parts.length - 2, "/"); } ref.set(APPLICATION_ID, "site", id, null, context); return true; } return false; }
String[] bodyVolumes = StringUtil.split(value, ","); for(int i = 0; i < bodyVolumes.length; i++)
String[] parts = StringUtil.split(reference, Entity.SEPARATOR);
String[] parts = StringUtil.split(reference, Entity.SEPARATOR);
protected Collection getEntityHierarchyAuthzGroups(Reference ref) { Collection<String> rv = new TreeSet<String>(); // add the root rv.add(getReference("/")); // try the resource, all the folders above it (don't include /) String paths[] = StringUtil.split(ref.getId(), Entity.SEPARATOR); boolean container = ref.getId().endsWith(Entity.SEPARATOR); if (paths.length > 1) { String root = getReference(Entity.SEPARATOR + paths[1] + Entity.SEPARATOR); rv.add(root); StringBuilder rootBuilder = new StringBuilder(); rootBuilder.append(root); for (int next = 2; next < paths.length; next++) { rootBuilder.append(paths[next]); if ((next < paths.length - 1) || container) { rootBuilder.append(Entity.SEPARATOR); } rv.add(rootBuilder.toString()); } } return rv; }
String[] parts = StringUtil.split(ref, Entity.SEPARATOR);
String[] parts = StringUtil.split(ref, Entity.SEPARATOR);
String[] parts = StringUtil.split(target, "/"); String id = "/"; StringBuilder idBuilder = new StringBuilder();
String[] refs = StringUtil.split(i.next().toString(), Entity.SEPARATOR); // splits the azGroups values so we can look for swapped state for (int i2 = 0; i2 < refs.length; i2++) // iterate through the groups to see if there is a swapped state in the variable
protected void addSizeCache(ContentResourceEdit edit) { // Note: This implementation is hard coded to just check for a quota in the "/user/" // or "/group/" area. -ggolden // Note: this does NOT count attachments (/attachments/*) nor dropbox (/group-user/<site id>/<user id>/*) -ggolden // quick exits if we are not doing site quotas // if (m_siteQuota == 0) // return false; // some quick exits, if we are not doing user quota, or if this is not a user or group resource // %%% These constants should be from somewhere else -ggolden if (!((edit.getId().startsWith("/user/")) || isInSiteCollection(edit.getId()))) return; // expect null, "user" | "group", user/groupid, rest... String[] parts = StringUtil.split(edit.getId(), Entity.SEPARATOR); if (parts.length <= 2) return; // get this collection String id = Entity.SEPARATOR + parts[1] + Entity.SEPARATOR + parts[2] + Entity.SEPARATOR; ContentCollection collection = null; try { collection = findCollection(id); } catch (TypeException ignore) { } if (collection == null) return; } // updateSizeCache();
String[] parts = StringUtil.split(edit.getId(), Entity.SEPARATOR); if (parts.length <= 2) return;
String[] parts = StringUtil.split(id, "/"); if (parts.length >= 3)