Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8335887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T03:48:41+00:00 2026-06-09T03:48:41+00:00

If we have code in the field that has a method that another product

  • 0

If we have code in the field that has a method that another product calls, and gets a list of objects back. And we need to make changes to the code to make it more flexible in populating the list to return, can we in the interim create an interceptor for the customer, that intercepts the method before it returns the list, and remove items from the list before the product that calls the method gets the list.

e.g.

OurCode.search() returns a list of foundObjects

Other product calls OurCode.search, receives 100 items

Can we create an interceptor that intercepts before OurCode.search returns, and alter the List of foundObjects, removing unnecessary items? This would only be a temporary fix until a future release

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T03:48:42+00:00Added an answer on June 9, 2026 at 3:48 am

    While I don’t recommend doing it that way (for sake of understandability, and as in my experience the “temporary fix” will become a permanent one) you can do this with Interceptors.

    @AroundInvoke
    Object filterSearchResults(InvocationContext ctx) throws Exception {
        Object result = ctx.proceed();
        if ( result != null) {
            List<SearchResult> results = (List<SearchResult>)result;
            // do whatever you want to to with your results here
            return results;
        }
        return result;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone have some code that will take a TimeZoneInfo field from .NET and
I have some code that looks like this. There is also an autoincrement field
I have a field on a from that a user creates a return code.
I have recently made changes in some code that makes a char name field
I have a code using protected field in super class. How can I avoid
So I have code: puts 'What is your name?(Enter in field below)' input =
I'm newb with generics/iterators/enumerators etc. I have code, it keeps field number (int) and
I have this code: ViewController .h @property IBOutlet UITextField *field; ViewController .m @synthesize field;
I currently have this code which reads the first field in a database record
I currently have my code set to disable the submit button when the field

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.