hybris Beans command-line tool + web API

Overview

This tool is a part of my hybris Runtime Developer tools package. It allows showing one-page all-in-one information about hybris beans using the command line interface.

Features

  • REST API and console tool with the common configuration,
  • Shows the information about the specific bean,
  • Changing bean values (!) on the fly.

Using

Command-line interface

The command-line app is a console wrapper for API. See API for the details.

Usage:

Change the value property of bean to value

./hybrisBeans.sh -b bean -n property -v value

Show all hybris beans:

./hybrisBeans.sh

Parameters

parameter  Description Example
? help, available options. Only for the console version.
bean (-b) Shows/update the bean information bean=myProductRaoPopulator
propertyname (-n) name of the bean to change propertyname=categoryService
propertyvalue (-v) new value of the bean propertyvalue=<defaultCategoryService>

propertyvalue=13

Changing any property of any bean:

#bash hybrisBeans.sh -b myProductRaoPopulator -n categoryService -v "<defaultCategoryService>"

image2016-8-17 20-49-0.png

You can see the list of bean methods here:

#bash hybrisBeans.sh -b indexerService
image2016-8-17 21-33-3.png

API

curl "https://electronics.local:9002/tools/beans/bean/myProductRaoPopulator?propertyName=categoryConverter&propertyValue=<defaultCategoryRaoConverter>" -k 2>/dev/null

Video

Limitations

  • You can change the value of the bean property only if the bean has a setter for this property. For example, bean “multipartResolver” (org.springframework.web.multipart.commons.CommonsMultipartResolver) has a roperty named maxUploadSize that cannot be changed using my utility because the class from Spring doesn’t have a setter.
  • The current implementation supports properties of two types: Strings and References. Properties of List or Map types are not supported yet.
  • Sometimes bean classes use parameters only at the first load. You will be able to change the values of the parameters but the initial value will be used anyway.

Download

The extension is available by request. E-mail: Rauf_Aliev@epam.com. Skype: rauf_aliev

One comment

  1. Great work !

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: