| | |
| | | AttributeBuilder builder = new AttributeBuilder(privType); |
| | | for (Privilege p : Privilege.getDefaultRootPrivileges()) |
| | | { |
| | | builder.add(AttributeValues.create(privType, p.getName())); |
| | | builder.add(p.getName()); |
| | | } |
| | | attrList = new LinkedList<Attribute>(); |
| | | attrList.add(builder.toAttribute()); |
| | |
| | | public AddOperation processAdd(String rawEntryDN, |
| | | List<RawAttribute> rawAttributes) |
| | | { |
| | | return processAdd(ByteString.valueOf(rawEntryDN), rawAttributes, |
| | | null); |
| | | return processAdd(ByteString.valueOf(rawEntryDN), rawAttributes, null); |
| | | } |
| | | |
| | | |
| | |
| | | LinkedHashMap<AttributeType,List<Attribute>> opAttrs = |
| | | new LinkedHashMap<AttributeType,List<Attribute>>(); |
| | | |
| | | Entry e = new Entry(addRecord.getDN(), objectClasses, userAttrs, |
| | | opAttrs); |
| | | Entry e = new Entry(addRecord.getDN(), objectClasses, userAttrs, opAttrs); |
| | | |
| | | ArrayList<AttributeValue> duplicateValues = |
| | | new ArrayList<AttributeValue>(); |
| | | ArrayList<ByteString> duplicateValues = new ArrayList<ByteString>(); |
| | | for (Attribute a : addRecord.getAttributes()) |
| | | { |
| | | if (a.getAttributeType().isObjectClass()) |
| | | { |
| | | for (AttributeValue v : a) |
| | | for (ByteString v : a) |
| | | { |
| | | String ocName = v.getValue().toString(); |
| | | String ocName = v.toString(); |
| | | String lowerName = toLowerCase(ocName); |
| | | ObjectClass oc = DirectoryServer.getObjectClass(lowerName, |
| | | true); |
| | | ObjectClass oc = DirectoryServer.getObjectClass(lowerName, true); |
| | | objectClasses.put(oc, ocName); |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | |
| | | return processAdd(addRecord.getDN(), objectClasses, userAttrs, |
| | | opAttrs); |
| | | return processAdd(addRecord.getDN(), objectClasses, userAttrs, opAttrs); |
| | | } |
| | | |
| | | |
| | |
| | | String password) |
| | | { |
| | | return processSimpleBind(ByteString.valueOf(rawBindDN), |
| | | ByteString.valueOf(password), |
| | | null); |
| | | ByteString.valueOf(password), null); |
| | | } |
| | | |
| | | |
| | |
| | | String attributeType, |
| | | String assertionValue) |
| | | { |
| | | return processCompare(ByteString.valueOf(rawEntryDN), |
| | | attributeType, |
| | | return processCompare(ByteString.valueOf(rawEntryDN), attributeType, |
| | | ByteString.valueOf(assertionValue), null); |
| | | } |
| | | |
| | |
| | | String assertionValue, |
| | | List<Control> controls) |
| | | { |
| | | return processCompare(ByteString.valueOf(rawEntryDN), |
| | | attributeType, |
| | | ByteString.valueOf(assertionValue), |
| | | controls); |
| | | return processCompare(ByteString.valueOf(rawEntryDN), attributeType, |
| | | ByteString.valueOf(assertionValue), controls); |
| | | } |
| | | |
| | | |
| | |
| | | String rawNewSuperior) |
| | | { |
| | | return processModifyDN(ByteString.valueOf(rawEntryDN), |
| | | ByteString.valueOf(rawNewRDN), |
| | | deleteOldRDN, |
| | | ByteString.valueOf(rawNewRDN), deleteOldRDN, |
| | | ByteString.valueOf(rawNewSuperior), null); |
| | | } |
| | | |
| | |
| | | List<Control> controls) |
| | | { |
| | | return processModifyDN(ByteString.valueOf(rawEntryDN), |
| | | ByteString.valueOf(rawNewRDN), |
| | | deleteOldRDN, |
| | | ByteString.valueOf(rawNewSuperior), |
| | | controls); |
| | | ByteString.valueOf(rawNewRDN), deleteOldRDN, |
| | | ByteString.valueOf(rawNewSuperior), controls); |
| | | } |
| | | |
| | | |
| | |
| | | le.getErrorMessage(), le); |
| | | } |
| | | |
| | | return processSearch(ByteString.valueOf(rawBaseDN), scope, |
| | | rawFilter); |
| | | return processSearch(ByteString.valueOf(rawBaseDN), scope, rawFilter); |
| | | } |
| | | |
| | | |