Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

How i can declare a parameter in the OSGi bundle configuration be required or mandatory? - Develop OSGi bundle to extend core functionality

Avatar

Level 2

Hi everyone,

How i can declare a parameter in the OSGi bundle configuration be required or mandatory?

Thanks,

Tung

1 Accepted Solution

Avatar

Correct answer by
Level 6

Hi Tung,

 

Have you tried this -

@Component @Providespublic class MyComponent implements MyService { @ServiceProperty(name="username", mandatory=true)private String m_username; @Property(name="password", mandatory=true)private String m_password;//...}

View solution in original post

1 Reply

Avatar

Correct answer by
Level 6

Hi Tung,

 

Have you tried this -

@Component @Providespublic class MyComponent implements MyService { @ServiceProperty(name="username", mandatory=true)private String m_username; @Property(name="password", mandatory=true)private String m_password;//...}