protected LongList listAllLinks() { LongList list = new LongList(); list.addAll(statLinks.keySet()); return list; }
/** * Lists all the identity-ids available. * * @return The object instance identifiers of the identities. */ public synchronized LongList listAllIdentities() { LongList list = new LongList(); list.addAll(this.identitiesToNamesMap.keySet()); return list; }
/** * Lists all the definitions available. * * @return The object instance identifiers of the Definitions. */ public synchronized LongList listAll() { LongList list = new LongList(); list.addAll(defs.keySet()); return list; }
/** * Lists all the defintion-ids available. * * @return The object instance identifiers of the identities. */ public synchronized LongList listAllDefinitions() { LongList list = new LongList(); list.addAll(this.objIdToDefMap.keySet()); return list; }
@Override public LongList call() { dbBackend.createEntityManager(); Query query = dbBackend.getEM().createQuery(QUERY_SELECT_ALL); query.setParameter("objectTypeId", objTypeId); query.setParameter("domainId", domainId); LongList objIds = new LongList(); objIds.addAll(query.getResultList()); dbBackend.closeEntityManager(); return objIds; } });
protected void setCheckEnabledAll(Boolean bool, SingleConnectionDetails connectionDetails) { LongList objIds = new LongList(); objIds.addAll(listAllCheckLinkIds()); for (Long objIdLink : objIds) { setCheckEnabled(objIdLink, bool, connectionDetails); } }
protected void setReportingEnabledAll(Boolean bool, SingleConnectionDetails connectionDetails) { LongList objIds = new LongList(); objIds.addAll(statLinks.keySet()); for (Long objId : objIds) { StatisticCreationRequest link = this.getStatisticLink(objId); link.getLinkDetails().setReportingEnabled(bool); this.update(objId, link, connectionDetails); } }
public void setGenerationEnabledAll(final Boolean bool, final ObjectId source, final SingleConnectionDetails connectionDetails) { LongList identityIds = new LongList(); identityIds.addAll(this.listAllIdentities()); for (Long identityId : identityIds) { AlertDefinitionDetails def = this.getAlertDefinitionFromIdentityId(identityId); def.setGenerationEnabled(bool); this.update(identityId, def, source, connectionDetails); } }
/** * sets the enableGeneration field of all existing parameters to the given * bool-value * * @param bool the value the enableGeneration field of all parameters should * be set to * @param source the source that created this update. will be set as the new * defintions source * @param connectionDetails the details of the connection */ protected void setGenerationEnabledAll(Boolean bool, ObjectId source, SingleConnectionDetails connectionDetails) { LongList identitiyIds = new LongList(); identitiyIds.addAll(this.listAllIdentities()); for (Long identityId : identitiyIds) { ParameterDefinitionDetails def = this.getParameterDefinition(identityId); def.setGenerationEnabled(bool); this.update(identityId, def, source, connectionDetails); } }
@Override public ConfigurationObjectDetails getCurrentConfiguration() { // Get all the current objIds in the serviceImpl // Create a Configuration Object with all the objs of the provider final HashMap<Long, Element> defObjs = manager.getCurrentDefinitionsConfiguration(); final ConfigurationObjectSet objsSet = new ConfigurationObjectSet(); objsSet.setDomain(ConfigurationProviderSingleton.getDomain()); LongList currentObjIds = new LongList(); currentObjIds.addAll(defObjs.keySet()); objsSet.setObjInstIds(currentObjIds); objsSet.setObjType(AppsLauncherHelper.APP_OBJECT_TYPE); final ConfigurationObjectSetList list = new ConfigurationObjectSetList(); list.add(objsSet); // Needs the Common API here! final ConfigurationObjectDetails set = new ConfigurationObjectDetails(); set.setConfigObjects(list); return set; }
private IdObjectTypeList getGroupObjectIdsFromGroupRecursive(GroupDetails group, LongList previousGroupInstances) { if (archiveService == null || group == null) { // If there's no archive... return null; } //easiest case: group contains non-group-instances //requirement: 3.9.4.h if (!group.getObjectType().equals(GroupHelper.GROUPIDENTITY_OBJECT_TYPE)) { // It is no group of groups? return new IdObjectTypeList(group.getInstanceIds(), group.getObjectType()); } else { //solve a case with less complexity: get the instances of the groups groups final LongList groupsGroupIdentityIds = group.getInstanceIds(); //the recursive method-calls should not check the instances that will be checked during the iterations in this method call LongList newPreviousGroupInstances = new LongList(); newPreviousGroupInstances.addAll(previousGroupInstances); newPreviousGroupInstances.addAll(groupsGroupIdentityIds); //iterate through all new Groups and add all their instances to the final list IdObjectTypeList idObjectTypeList = new IdObjectTypeList(); for (int i = 0; i < groupsGroupIdentityIds.size(); i++) { final Long groupInstance = groupsGroupIdentityIds.get(i); //this group wasnt checked yet? if (!previousGroupInstances.contains(groupInstance)) { previousGroupInstances.add(groupInstance); // Retrieve the groups group-ids from the archive // requirement: 3.9.4.h GroupDetails nextGroupInstance = retrieveGroupDetailsFromArchive(group.getDomain(), groupInstance); idObjectTypeList.addAll(this.getGroupObjectIdsFromGroupRecursive(nextGroupInstance, newPreviousGroupInstances)); } } return idObjectTypeList; } }
/** * Provides the current set of definitions available in the Manager. * * @return The definitions set and the corresponding object instance * identifiers. */ public synchronized ConfigurationObjectSetList getCurrentConfiguration() { LongList idObjIds = new LongList(); LongList defObjIds = new LongList(); for (ObjectInstancePair pair : this.namesToPairsMap.values()) { idObjIds.add(pair.getObjIdentityInstanceId()); defObjIds.add(pair.getObjDefInstanceId()); } ConfigurationObjectSet idents = new ConfigurationObjectSet(); idents.setDomain(ConfigurationProviderSingleton.getDomain()); idents.setObjInstIds(idObjIds); LongList currentObjIds1 = new LongList(); currentObjIds1.addAll(defObjIds); ConfigurationObjectSet defis = new ConfigurationObjectSet(); defis.setDomain(ConfigurationProviderSingleton.getDomain()); defis.setObjInstIds(currentObjIds1); ConfigurationObjectSetList list = new ConfigurationObjectSetList(); list.add(idents); list.add(defis); return list; }
tempIdentityLst.addAll(manager.listAllIdentities()); // ... add all in a row unkIndexList.clear(); break;
if (identityId == 0) { // Is it the wildcard '0'? requirement: 3.4.12.2.b removalLst.addAll(manager.listAllIdentities()); // ... add all in a row unkIndexList.clear(); break;
tempIdsToRemoveLst.addAll(manager.listAllLinks()); // ... add all in a row break;
removalLst.addAll(manager.listAllIdentities()); // ... add all in a row unkIndexList.clear(); break;
removalLst.addAll(manager.listAllIdentities()); // ... add all in a row
inIdentityIds.addAll(manager.listAllIdentities()); // ... add all in a row
tempCheckLinkIds.addAll(manager.listAllCheckLinkIds()); // ... add all in a row