Menu

HTML and CSS code supported by email clients


Creating a AEM configuration or OSGi Config

Create an OSGi configuration for Adobe Experience Manager(AEM), that could be use to manage different configuration values, based on the runmode.

  1. Create a Configuration class, ObjectClassDefinition.
    package com.adobe.aem.guides.wknd.core.config;
    
    import org.osgi.service.metatype.annotations.AttributeDefinition;
    import org.osgi.service.metatype.annotations.ObjectClassDefinition;
    
    @ObjectClassDefinition(
        name = "Cognito Forms API Configuration",
        description = "Configuration for the Cognito Forms API integration"
    )
    public @interface CognitoFormsApiConfiguration {
    
        @AttributeDefinition(
            name = "Endpoint",
            description = "Base endpoint URL for Cognito Forms API"
        )
        String endpoint() default "https://api.cognitoforms.com";
    
        @AttributeDefinition(
            name = "Client ID",
            description = "Client ID for the Cognito Forms API"
        )
        String clientId();
    
        @AttributeDefinition(
            name = "Client Secret",
            description = "Client Secret for the Cognito Forms API"
        )
        String clientSecret();
    }
    
  2. Now, create an interface with getter methods.

    package com.adobe.aem.guides.wknd.core.services;
    
    public interface CognitoFormsApiService {
        String getEndpoint();
        String getClientId();
        String getClientSecret();
    }
    
  3. Finally, create a class and implement the interface which we created in step 2.
    package com.adobe.aem.guides.wknd.core.services.impl;
    
    import org.osgi.service.component.annotations.Activate;
    import org.osgi.service.component.annotations.Component;
    import org.osgi.service.component.annotations.Modified;
    import org.osgi.service.metatype.annotations.Designate;
    
    import com.adobe.aem.guides.wknd.core.config.CognitoFormsApiConfiguration;
    import com.adobe.aem.guides.wknd.core.services.CognitoFormsApiService;
    
    @Component(immediate = true, service = CognitoFormsApiService.class)
    @Designate(ocd = CognitoFormsApiConfiguration.class)
    public class CognitoFormsApiServiceImpl implements CognitoFormsApiService {
    
        private volatile String endpoint;
        private volatile String clientId;
        private volatile String clientSecret;
    
        @Activate
        @Modified
        protected void activate(CognitoFormsApiConfiguration config) {
            this.endpoint = config.endpoint();
            this.clientId = config.clientId();
            this.clientSecret = config.clientSecret();
        }
    
        @Override
        public String getEndpoint() {
            return endpoint;
        }
    
        @Override
        public String getClientId() {
            return clientId;
        }
    
        @Override
        public String getClientSecret() {
            return clientSecret;
        }
    }
    

Ethnocentrism Explained: Meaning, Examples, and Its Impact on Society

Ethnocentrism is the belief that one’s own culture, values, or way of life is better or more “normal” than others. People who think ethnocentrically often judge other cultures using their own cultural standards, without fully understanding the context or traditions of those cultures.

This mindset usually develops naturally because individuals grow up learning the customs, language, and beliefs of their own society. As a result, what feels familiar is often seen as right, while unfamiliar practices may seem strange or incorrect. For example, food habits, clothing styles, or communication methods from another culture may be viewed negatively simply because they are different.

Ethnocentrism can create misunderstandings and conflicts, especially in diverse workplaces or multicultural societies. It may lead to stereotypes, discrimination, or a lack of cooperation between groups. When people believe their culture is superior, they may ignore valuable ideas and perspectives from others.

However, ethnocentrism is not always intentional or harmful. In some cases, it can promote group unity and a sense of identity. The problem arises when it prevents openness and respect for diversity.

Reducing ethnocentrism requires cultural awareness and empathy. By learning about other cultures and understanding that differences are not flaws, individuals can develop a more inclusive and respectful worldview.