Giter Site home page Giter Site logo

Comments (9)

gabibeyo avatar gabibeyo commented on July 18, 2024

Hope I understand your question.

as you can see from the documentation, the field can be free strings for both requests and responses.
Where ever you see FieldType enum you can instead use your custom String.

Let me know if I answered your question.

from domain-directory-controller.

aram535 avatar aram535 commented on July 18, 2024

Yes I did see that and that is what I tried, but the field kept coming back empty - figured I was doing something wrong there. Figured out the bug in my debug, thank you for your reply.

from domain-directory-controller.

aram535 avatar aram535 commented on July 18, 2024

Let me ask a follow up question, and please let me know if you like this in a new issue. I'm now trying to filter on the extra field so that I don't have to get extra entries but looks like the pattern doesn't match the factory.

    Sentence sentence = queryAssembler.addPhrase(FieldType.EMAIL, PhraseOperator.CONTAINS, "email")
                                      .addPhrase(FieldType.DEPARTMENT, PhraseOperator.EQUAL, "IT")
                                      .closeSentence(SentenceOperator.AND);

Works, however:

    Sentence sentence = queryAssembler.addPhrase(FieldType.EMAIL, PhraseOperator.CONTAINS, "email")
                                      .addPhrase("someotherField", PhraseOperator.EQUAL, "foo")
                                      .closeSentence(SentenceOperator.AND);

Causes a compile error Description

The method addPhrase(FieldType, PhraseOperator, String) in the type QueryAssembler is not applicable for the arguments (String, PhraseOperator, String)

from domain-directory-controller.

gabibeyo avatar gabibeyo commented on July 18, 2024

I can see that, I will look into that and update you asap.
We will probably need to release a fixed version.

I will keep you updated.

from domain-directory-controller.

gabibeyo avatar gabibeyo commented on July 18, 2024

@aram535 , I think I fixed that, also tested it in my environment.
The changes are committed in this branch (still not in master):
https://github.com/imperva/domain-directory-controller/tree/enable_query_by_fieldtype_string

Can you please clone this branch, compile and test it in your environment?
The version I used for this branch is 7.3.3.0.1.0, so you can point to it in your project.

Once you validate it I will release a fix

from domain-directory-controller.

aram535 avatar aram535 commented on July 18, 2024

Yes the query looks like exactly what I needed:
'(&(&(objectCategory=person)(objectClass=user))(identitylifecyclestate=*active*)(mail=*[email protected]*))'

from domain-directory-controller.

gabibeyo avatar gabibeyo commented on July 18, 2024

Perfect. I will release an official version in the next weeks.
Meanwhile you can work with this one. Let me know if you have any other questions.

from domain-directory-controller.

davidkhanpk avatar davidkhanpk commented on July 18, 2024

I am trying to get name of the group. I tried every field type and common strings related to name but I can't get the name of the group.

queryRequestGroup.setObjectType(ObjectType.GROUP); queryRequestGroup.addRequestedField(FieldType.EMAIL);

I can get the email but unable to get the group name.

from domain-directory-controller.

gabibeyo avatar gabibeyo commented on July 18, 2024

Hi @davidkhanpk ,

Try:
queryRequestGroup.addRequestedField(FieldType.COMMON_NAME);
OR
queryRequestGroup.addRequestedField("displayName");

Please let me know...

from domain-directory-controller.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.