Skip navigation links
SAP NetWeaver 7.50 Enterprise Portal (SP 22)

Package com.sap.portal.pcm.admin

Provides interfaces that enable a semantic object to be visible in the Portal Catalog.

See: Description

Package com.sap.portal.pcm.admin Description

Provides interfaces that enable a semantic object to be visible in the Portal Catalog.

Tools that rely on this set of interfaces are:

Multiple Interfaces � IAdminBase

Semantic objects are very rich, but implementing all features in a single class is often expensive and sometimes hard to do.

To allow for flexible implementation, a basic interface called IAdminBase is introduced, which enables the retrieval of other interfaces for the object.

Object getImplementation(String ImplementationID):

A number of predefined implementation IDs are provided in IAdminBase.

Obtaining IAdminBase

Obtain the IAdminBase interface by doing a PCD lookup and specifying the administration aspect, as follows:

    Hashtable env1 = new Hashtable();
     
    env1.put(Context.INITIAL_CONTEXT_FACTORY, IPcdContext.PCD_INITIAL_CONTEXT_FACTORY);
    env1.put(Context.SECURITY_PRINCIPAL, request.getUser());
    env1.put(Constants.REQUESTED_ASPECT, PcmConstants.ASPECT_ADMINISTRATION);

    InitialContext iCtx = null;

    try {

        iCtx1 = new InitialContext(env1);
        IAdminBase adminBase = (IAdminBase)iCtx.lookup(lookupObject);

        // Write type of portal object
        response.write("Object Type: " + adminBase.getObjectType()+"<BR>"); 
        
        // Get ICatalogNode interface
        ICatalogNode cn = (ICatalogNode) adminBase.getImplementation(IAdminBase.CATALOG_NODE);

        // Write title of portal object
        response.write(cn.getTitle(request.getLocale())+"<BR>");

        // Get object for obtaining image URL
        PcmUri pcmUri = cn.getIcon(ObjectState.DEFAULT);

    } catch (NamingException e) {}

Skip navigation links
SAP NetWeaver 7.50 Enterprise Portal (SP 22)

Copyright 2021 SAP SE Complete Copyright Notice