Creation of a Log Profile

Creates a log profile.

Syntax

void createDomainLogProfile(String profileName, String description, Collection<DomainLogTrapVO> traps,
			Boolean enable) throws SUPAdminException; 

Returns

If successful, returns silently. If unsuccessful, returns SUPAdminException.

Examples

  • String profileName = “profile1”;
    Collection<DomainLogTrapVO<? extends Enum>> traps = new ArrayList<DomainLogTrapVO<? extends Enum>>();
    DomainLogTrapVO<DOMAIN_LOG_PROFILE_PACKAGE_TRAP> trap1 = new DomainLogTrapVO<DOMAIN_LOG_PROFILE_PACKAGE_TRAP>(
    DOMAIN_LOG_PROFILE_PACKAGE_TRAP.APPLICATION_ID);
    
    DomainLogTrapVO<DOMAIN_LOG_PROFILE_SECURITY_TRAP> trap2 = new DomainLogTrapVO<DOMAIN_LOG_PROFILE_SECURITY_TRAP>(
    DOMAIN_LOG_PROFILE_SECURITY_TRAP.SECURITY_CONF);
    
    DomainLogTrapVO<DOMAIN_LOG_PROFILE_ENDPOINT_TRAP> trap3 = new DomainLogTrapVO<DOMAIN_LOG_PROFILE_ENDPOINT_TRAP>(
    DOMAIN_LOG_PROFILE_ENDPOINT_TRAP.ENDPOINT);
    
    DomainLogTrapVO<DOMAIN_LOG_PROFILE_APPCONNECTION_TRAP> trap4 = new DomainLogTrapVO<DOMAIN_LOG_PROFILE_APPCONNECTION_TRAP>(
    DOMAIN_LOG_PROFILE_APPCONNECTION_TRAP.APPLICATION_CONNECTION_ID);
    
    DomainLogTrapVO<DOMAIN_LOG_PROFILE_PAYLOAD_TRAP> trap5 = new DomainLogTrapVO<DOMAIN_LOG_PROFILE_PAYLOAD_TRAP>(
    DOMAIN_LOG_PROFILE_PAYLOAD_TRAP.PAY_LOAD);
    
    trap1.setEnabled(true);
    trap1.setValues(Arrays.asList(new String[] { "app1:1.0", "app2:2.0" }));
    
    trap2.setEnabled(true);
    trap2.setValues(Arrays.asList(new String[] { "admin", "test" }));
    
    trap3.setEnabled(true);
    EndpointTrapVO etvo1 = new EndpointTrapVO();
    etvo1.setName("sampledb");
    etvo1.setType(ENDPOINT_TYPE.JDBC);
    EndpointTrapVO etvo2 = new EndpointTrapVO();
    etvo2.setName("sap_crm:1.0");
    etvo2.setType(ENDPOINT_TYPE.DOEC);
    trap3.setValues(Arrays.asList(new EndpointTrapVO[] { etvo1, etvo2 }));
    
    trap4.setEnabled(true);
    trap4.setValues(Arrays.asList(new String[] { "emulator1", "bb2" }));
    
    trap5.setEnabled(true);
    trap5.setValues(Arrays
    				.asList(new DOMAIN_LOG_CATEGORY[] {
    						DOMAIN_LOG_CATEGORY.DATA_SYNC,
    						DOMAIN_LOG_CATEGORY.GENERAL_DCN }));
    
    traps.add(trap1);
    traps.add(trap2);
    traps.add(trap3);
    traps.add(trap4);
    traps.add(trap5);
    
    domainLog.createDomainLogProfile(profileName, description, traps,
    			false);