Alon Bar-Lev has posted comments on this change.

Change subject: aaa: Introducing format to id of User and Group API entities
......................................................................


Patch Set 3:

(1 comment)

http://gerrit.ovirt.org/#/c/26191/3/backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/utils/DirectoryEntryIdUtils.java
File 
backend/manager/modules/restapi/types/src/main/java/org/ovirt/engine/api/restapi/utils/DirectoryEntryIdUtils.java:

Line 9: public class DirectoryEntryIdUtils {
Line 10: 
Line 11:     // ID is in format of "id=<UUID>:provider_name=<string>:<string>"
Line 12:     private static final Pattern ID_PATTERN =
Line 13:             
Pattern.compile("(id=)([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}):(provider_id=)(.+:.+)");
> please always use named groups[1]
you can also have supergroup for entire providerid string if it helps.

 
(id=(?<id>.*)|(?<providerid>providerid=(?<provider>([^:]*):(?<id_within_provider>.*))
Line 14: 
Line 15:     /**
Line 16:      * Gets the internal id part from the id string
Line 17:      * @param id the id string


-- 
To view, visit http://gerrit.ovirt.org/26191
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iaecb5d43945769db82475edde1c7075c1a343c07
Gerrit-PatchSet: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: Alon Bar-Lev <alo...@redhat.com>
Gerrit-Reviewer: Barak Azulay <bazu...@redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com>
Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to