Sitemap

Showing posts with label Oracle UCM. Show all posts
Showing posts with label Oracle UCM. Show all posts

Thursday, August 27, 2015

UCM: dinDate, dCreateDate, dReleaseDate, and dOutDate


  • The dInDate field shows the date and time on the check-in form.  (The Release Date field on the check-in form uses this value).

  • The dCreateDate field is the date and time the document is actually checked into the system.

  • The dReleaseDate field shows the date and time the document makes it to the Released state (after being converted, indexed, out of workflow, etc.).  This gets modified during a metadata update.

  • The dOutDate field shows the date the document will expire (The Expiration Date on the check-in form uses this value).

NOTE: The counters logic was rewritten in 11g and the RevClasses table was part of the solution. Addition information about dDocCreatedDate can be found in the documentation: (Section 5.1.13 Configuring the dDocCreatedDate Attribute)

Wednesday, July 8, 2015

UCM: Standard Services

checkSecurity
• Takes none or one parameter. If a parameter is given, it will be the name of a ResultSet. The method checks if the logged in user has the appropriate security as specified in the access level of the service to perform the specified action. It checks the security against a specific security group and account (if accounts are enabled) as specified by a revision. This method is used for validating security for actions on a particular content item, e.g. check in, check out, delete, etc.

createResultSetSQL
• Takes no parameters. Given a dataSource, whereClause (as set in local data), the method looks up the data source in the DataSources table and executes the query with the additional where clause. The method will append additional security clauses to any query referencing the Workflow and Revisions table. The environment value MaxQueryRows determines the cut off point for the number of rows returned. The results of the query are placed in the data with the name as specified by the resultName (as set in local data).

doSubService
• Takes one parameter. Given the name of a sub service, will execute it.

loadDefaultInfo
• Takes no parameters. The method will first execute the loadDefaultInfo filter. It then loads environment information, types, formats and accounts. Used for creating check-in and update pages.

loadMetaOptionsLists
• Takes no parameters. The method will first execute the filter loadMetaOptionsLists. It then proceeds to load all options list as referred to in the DocMetaDefinition table.

loadSharedTable
• Takes two parameters. The first parameter is the name of the table to look up in the server's cached tables. The second is the name the table will be given when added to the data. Use this method instead of executing a query, when the data is already cached in the server. This method is primarily used to make a server-cached table available for a template.

loadSharedTableRow
• Takes two parameters. The first parameter is the name of the table to look up in the server's cached tables. The second parameter is an argument specifying a column in the database and a lookup key into the request data. The value for the key in the request data is used to find the row in the cached table. The values of the row are mapped to the local data using the names of the columns as keys. One usage for this function is to retrieve cached information about a specific user.

mapResultSet
• Takes at least three parameters. The first parameter is the name of a select query; the parameters that follow must appear in pairs. The first member of the pair is the column name; the second member is the key that is used to put the row value into local data. The method will execute the specified query and map the specified columns of the first row of the ResultSet to the local data. Use this method in replacement of a Type 5 action, if the service only requires a part of the first row of a ResultSet to be stored.

refreshCache
• Given a list of subjects, this method will do a refresh on each specified subject.

renameValues
• Takes multiple parameters that must appear in pairs. The pairs are made up of two keys. The first key is used to look up a value in the data. The second key is used to store the found value in the local data. If the value is not found, an exception is thrown and the service will abort with an error message.

setConditionVars
• Given a list of condition variables, this method will set them all to true. These values can only be tested in HTML template pages. They are not put into local data.

setLocalValues
• Takes multiple parameters that must appear in name/value pairs. The name/value pairs are placed into the local data.

Monday, June 22, 2015

SelectivelyRefineAndIndex Component

Component Information:
The ability to control the conversion and indexing of content is accessible through two resource includes defined in the component.

The first resource include is called "pre_submit_to_conversion". Before a content item is sent to the Inbound Refinery, this resource include is executed. Within this include, the administrator may manipulate the "dConversion" variable depending on the metadata of the document. Setting this variable to "PASSTHRU" will cause that content item to skip conversion, while setting it to "MultipageTiff" will cause that document to use the "MultipageTiff" conversion. Now, instead of merely relying upon file type to determine conversion settings, the administrator may use the value of any metadata fields.

Download from the link below:
http://www.oracle.com/technetwork/middleware/content-management/index-092832.html


I read this one note on metalink where the items are being checked in using Batchloader or IdcCommand. The files for these items are sent to the IBR for conversion. And the user wants that specific files that would normally be sent to the IBR be set for passthru and not be converted.

In the batchloader text file or hda file add the following parameters:

webViewableFile=<source file>.<source file extension>
webViewableFile:path=<source file path>/<source file>.<source file extension>
dWebExtension=<source file extension>

Example:
IdcService=CHECKIN_NEW
primaryFile=/tmp/AutoArchive.doc
dDocType=TEST
dDocTitle=TEST PASSTHRU 15
dSecurityGroup=Public
dDocAccount=Account1
dDocAuthor=pjolson
webViewableFile=AutoArchive.doc
webViewableFilePath=/tmp/AutoArchive.doc
dWebExtension=doc
xStorageRule=JDBC_Storage_Webless
<>

Note that this example is using a webless FSP rule. But even if designating the webviewable file, it still won't add it to the weblayout directory or the FileStorage table.

Friday, June 19, 2015

UCM: ClassNames

Service
• This class can be specialized to override existing methods or add new methods. Service class includes methods for clearing local data, maping result sets, renaming values, loading and validating values, caching shared tables, checking security, forcing login, getting and filling user data, loading meta data options lists, and refreshing chached data.

DocService
• This class can be specialized to override existing methods or add new methods. DocService includes methods for executing services of DocServiceHandler and computing document URLs.

MetaService
• This class can be specialized to override existing methods or add new methods. MetaService includes methods for updating meta data definitions, updating option lists, updating templates, and getting option lists.

DocHandlerFactory
• DocHandlerFactory can be implemented to create a customized version of DocServiceHandler. The class which implements DocHandlerFactory must be registered to DocService using the static service setHandlerFactory(). DocServiceHandler includes methods for checking in content, handling subscriptions, handling the format wizard, loading default information fields, validating information fields, updating and deleting content items.

PageHandlerService
• This class can be specialized to override existing methods or add new methods. PageHandlerService includes methods for performing report queries and outputting historical reports.

WorkflowDocImplementor
• This class can be specialized to augment the behavior of workflow handling. WorkflowDocImplementor includes methods for handling general and criteria workflow.

RevisionImplementor
• This class can be specialized to augment the behavior of major and minor revision control.

SecurityImplementor
• SecurityImplementor can be implemented to override current security handling. You can extend ServiceSecurityImplementor to augment the current behavior.

Text Extraction Process manually: textexport

The text extraction process is performed using the "textexport" program that comes bundled in the ContentAccess component. This component contains Oracle OutsideIn functionality. The textexport program reads the PDF file and places all of the extracted text into the active collection folder (ots1 or ots2) under
<ucm-install>/search/ots1/bulkload/~export

To preserve this file, open the Repository Manager applet, and on the Indexing tab, click the Configuration button. On the popup that displays, the debug level can be set to trace.

If you want to see the text extraction process, you need to run the textexport manually. Create an HDA testfile.hda file where the input file parameter will need to be set to a valid path:
<?hda version="10.1.3.5.1 (111229)" jcharset=UTF8 encoding=utf-8?>
@Properties LocalData
OutputCharacterSet=utf8
blFieldTypes=
FallbackFormat=fi_unicode
InputFilePath=C:\Users\sonal\Downloads\pdf.pdf
blDateFormat=M/d/yy {h:mm[:ss] {aa}[zzz]}!mAM,PM!tAmerica/Chicago
@end

Run the following command from the cmd:
C:\Oracle\Oracle_ECM1\oit\win32\lib\contentaccess\textexport.exe -c C:\testfile.hda -f C:\finaltextfile.txt

finaltextfile.txt will contain the extracted text from the pdf file mentioned in the HDA file.
fi_unicode: Display as text and assume the Unicode character set.

Wednesday, May 20, 2015

UCM: Component Creation

If you want to start building a UCM component from scratch, then download the ABCComponent.zip file from the Downloads. It contains most of the common resource files, common code for building services and filters, thereby saving your time.

Just open ComponentWizard applet, add a new component, provide a new name for the component, check the copy existing option, select the ABCComponent.hda file. After that, modify the component according to requirements.

Wednesday, May 6, 2015

IdcCommand

Create a file named "pingserver.hda" and add the following lines to it:
@Properties LocalData
IdcService=PING_SERVER
@end

Open a command prompt and change to your <working_dir>\<instance>\ucm\cs\bin directory (for example, cd C:\working_dir\development\ucm\cs\bin).

Issue the following command:
IdcCommand -f C:\pingserver.hda -u sysadmin -l C:\pingserver.log -c server

Confirm the output.

More info: http://docs.oracle.com/cd/E29542_01/doc.1111/e26694/idc.htm#WCCDV334

Saturday, April 11, 2015

UCM: Custom Service Class

A custom service class extends the content server’s core intradoc.server.Service.

The Service super class does not contain any methods that should be called directly. It mainly has support functions for
• Running service actions in the correct order
• Initializing a user’s security
• Running database queries
• Creating the context for the request

Key Service Class Objects
Variable Class Description
m_workspace intradoc.data.Workspace The database connection
m_binder intradoc.data.DataBinder The request and response data
m_currentAction intradoc.data.Action The current service action
m_serviceData intradoc.data.ServiceData The current service’s definition
m_userData intradoc.data.UserData The user running the service
m_service intradoc.data.Service A reference to the parent service object

The predefined Service class object m_binder has the same functionality as &IsJava=1

This is how a service class or service handler can access a parameter being passed from the service action:
String param = m_current_action.getParamAt(0);

This will get the first parameter.

Service class methods that are called from a service have a required signature: public void myMethod() throws DataException, ServiceException;
public class AcmeMailService extends Service {

    public void sendMail() throws DataException, ServiceException {
        String str = m_binder.getLocal("acmeEmailAddresses");
    }
}


Service classes:
• Service classes require minimal registration inside the server.
• Methods of a service class can only be used as actions in a service associated with that service class.
• Methods of a custom service class cannot be used as actions when extending standard services.

Service handlers
• Service handlers require additional registration inside the server.
• Methods of a service handler can be used as actions in services associated with different service classes.
• Methods of a custom service handler can be used as actions when extending standard services.

UCM: Read HDA Files

Sunday, April 5, 2015

UCM: Tips and Tricks

To ensure that the two metadata fields Security Group and Type do not contain any default values upon check-in:
ForceDocTypeChoice=1
ForceSecurityGroupChoice=1


When set to TRUE, resource files defined in components will be refreshed only when the content server is restarted which will increase CS performance. Definitely set this to TRUE in your production environments.
DisableSharedCacheChecking=true


To restrict users with read only permissions to download a copy of the content (you might have to search within the <cs> directory and text search for GetCopyAccess. Edit the files that contain GetCopyAccess=true and set the parameter to false. Restart the server). For more information, check Doc ID 1260914.1.
GetCopyAccess=false


Custom or standard services used for file uploads now require additional configuration parameters below
ForcePermissionCheckforAllowedUploadServices=true (if user permissions are used, it will require validation)
AppendToAllowedUploadServices=<ServiceName1>,<ServiceName2>,<ServiceName3>


Incoming Socket Connection Address Security Filter
SocketHostAddressSecurityFilter=127.0.0.1|10.111.19.15


When batchloading content from the command line, the user specified in the BatchLoaderUserName configuration entry must have administrative rights to the security group to which the content is being checked in.
BatchLoaderUserName=sysadmin


To turn off all content profiles and disable all global rules
DisableContentProfiles=true


To increase the size of the memo field beyond 255. This will only apply to newly created fields.
MemoFieldSize=3000


To enable the error logging for BatchLoader when running it from the command line
EnableErrorFile=true


To set the maximum number of search connections that are open simultaneously. For example, if MaxSearchConnections=5, and six search requests are made at the same time, the sixth request goes into a queue until one of the first five requests is completed.
MaxSearchConnections=5


This can be used to support a high ingestion rate when transferring content items from an external repository into Content Server storage, bypassing Inbound Refinery, workflow, and indexing.
DirectReleaseNewCheckinDoc=1


Disable a particular query form view. Possible values we can set are "standard" which is the default, and "queryBuilder".
DisabledSearchFormTypes=queryBuilder


To create tables based on external database views.
EBRIncludeViewsInTableList=true


Disable the authorization check
DisableAuthorizationTokenCheck=true


To speed up the scheduled execution time of the scheduled events to run every minute for scheduled events that normally run every hour
DoDebugFastScheduledEvents=true


Get the post install screen after the installation of UCM
ForceInitialPostInstallConfiguration=true


Searching all revisions of a content (Refer https://community.oracle.com/thread/3718985)
SearchEngineName=DATABASE.METADATA.ALLDOCS


While importing contents using archiver, if the user gets the csCheckinReleaseDateError, add the first 2 entries in the source and target UCM instances. If this doesn't work, then add the third entry and restart
UseRevisionCreateDate=true       //Preserves the release date
AllowMatchesInDateCheck=true     //Allows two content items to share the same time interval
SystemDateFormat=M/d/yyyy {h:mm[:ss] {aa}[zzz]}!mAM,PM


OracleTextSearch
SearchIndexerEngineName=OracleTextSearch
IndexerDatabaseProviderName=SystemDatabase   //Name of the Database Provider used to store the search index.
AdditionalEscapeChars=_:#

UCM: Component to reinitialize UCM components without restarting UCM

Created a helper component to reload the component's glue file, the query file, resource files, and template definition files, so that there is no need of restarting the UCM server while developing the components in development environment.

This component MUST NOT be deployed to customer's instance, and MUST NOT be included in the installation package.

public class UcmHelperService
  extends Service
{
  public static final String STATUS_CODE = "StatusCode";
  public static final String STATUS_MESSAGE = "StatusMessage";
  public static final String STATUS_SUCCESS = "0";
  public static final String STATUS_ERROR = "-1";
  protected static ComponentPackager m_componentPackager;
  
  public void reinitComponents()
  {
    try
    {
      String componentName = this.m_binder.getActiveAllowMissing("ComponentName");
      ComponentLoader.reset();
      ComponentLoader.initDefaults();
      
      ComponentLoader.load();
      IdcSystemLoader.loadComponentData();
      IdcSystemLoader.loadResources();
      if ((null != componentName) && (componentName.trim().length() > 0)) {
        reinitServices(componentName);
      } else {
        IdcSystemLoader.loadServiceData();
      }
      reinitQueries(componentName);
      this.m_binder.putLocal("StatusCode", "0");
    }
    catch (Exception e)
    {
      this.m_binder.putLocal("StatusCode", "-1");
      this.m_binder.putLocal("StatusMessage", e.getLocalizedMessage());
    }
  }
  
  protected static void trace(String message)
  {
    Report.trace("UcmHelperService", message, null);
  }
  
  protected static void traceBinder(DataBinder dataBinder)
  {
    if (dataBinder.getLocalData().isEmpty())
    {
      trace("binder.getLocalData is empty");
    }
    else
    {
      trace("(Sniffer) binder.getLocalData output");
      Iterator it = dataBinder.getLocalData().keySet().iterator();
      while (it.hasNext())
      {
        String key = it.next().toString();
        trace(key + " = " + dataBinder.getLocal(key));
      }
    }
  }
  
  private void reinitServices(String componentName)
    throws ServiceException, DataException
  {
    ServiceManager serviceManager = new ServiceManager();
    ResourceTrace.msg("!csComponentLoadServices");
    ResourceContainer resourcecontainer = new ResourceContainer();
    Vector vector = ComponentLoader.m_services;
    int i = vector.size();
    for (int j = 0; j < i; j++)
    {
      ComponentData componentdata = (ComponentData)vector.elementAt(j);
      if (componentdata.m_componentName.equalsIgnoreCase(componentName)) {
        reinitService(serviceManager, resourcecontainer, componentdata);
      }
    }
  }
  
  private void reinitService(ServiceManager serviceManager, ResourceContainer resourceContainer, ComponentData componentData)
    throws DataException, ServiceException
  {
    String s = componentData.m_file;
    String s1 = "!csComponentLoadSystemServices";
    if (!componentData.m_componentName.equalsIgnoreCase("default")) {
      s1 = LocaleUtils.encodeMessage("csComponentLoadName", null, componentData.m_componentName);
    }
    ResourceTrace.msg(s1);
    ResourceLoader.loadResourceFile(resourceContainer, s);
    Vector vector1 = componentData.m_tables;
    int k = vector1.size();
    for (int l = 0; l < k; l++) {
      serviceManager.addTable(resourceContainer, (String)vector1.elementAt(l), componentData);
    }
  }
  
  private void reinitQueries(String componentName)
    throws DataException, ServiceException
  {
    ResourceContainer resourcecontainer = new ResourceContainer();
    ResourceTrace.msg("!csComponentLoadQueries");
    Vector vector = ComponentLoader.m_queries;
    int j = vector.size();
    for (int k = 0; k < j; k++)
    {
      ComponentData componentdata = (ComponentData)vector.elementAt(k);
      String s9 = componentdata.m_file;
      boolean flag3 = true;
      String s10 = "!csComponentLoadSystemQuery";
      if (!componentdata.m_componentName.equalsIgnoreCase("default")) {
        s10 = LocaleUtils.encodeMessage("csComponentLoadName", null, componentdata.m_componentName);
      }
      if ((componentName == null) || (componentName.trim().equalsIgnoreCase(componentdata.m_componentName)))
      {
        ResourceTrace.msg(s10);
        DataLoader.cacheResourceFile(resourcecontainer, s9);
        Vector vector1 = componentdata.m_tables;
        int l = vector1.size();
        for (int i1 = 0; i1 < l; i1++) {
          QueryUtils.addQueryTable(this.m_workspace, resourcecontainer, (String)vector1.elementAt(i1), flag3, componentdata.m_componentName);
        }
      }
    }
  }

UCM: Execute a service

From a Java filter:
CompInstallUtils.executeService(ws, "ADD_WORKFLOW", binder);


From a Service Handler
    private void executeService(final DataBinder serviceBinder, final String serviceName) throws ServiceException {
        try {
            trace("Calling service " + serviceName + ": " + serviceBinder.getLocalData().toString());
            m_service.getRequestImplementor().executeServiceTopLevelSimple(serviceBinder, serviceName, m_service.getUserData());
            trace("Finished calling service");
        } catch (final DataException e) {
            e.printStackTrace(System.out);
            throw new ServiceException(serviceName, e);
        }
    }


From a Service class:
Use the one provided in the book of Bex Huff.

UCM: Content Folios


UCM: Customizing "Quick Search" to search specified metadata fields

Add the QuickSearchFields settings in the config.cfg file.
QuickSearchFields=dDocName|dDocTitle|xComments|dDocFullText

In order to make the above setting work with the full text search solutions (DATABASE.FULLTEXT and OracleTextSearch) as well as DATABASE.METADATA, the above setting will need to be paired with the setting listed below in the config.cfg file:
QuickSearchOperators=hasAsSubstring,hasAsWord,hasAsWord,fullText

*** The default operator for Quick Search is "hasAsWord".***

To emulate the same search in idoc:
dDocName <SUBSTRING> `xxx` <AND> dDocTitle <CONTAINS> `xxx` <AND> xComments <CONTAINS> `xxx` <AND> <ftx>xxx<ftx>

For more info:
https://blogs.oracle.com/kyle/entry/adding_fields_to_quick_search
http://www.redstonecontentsolutions.com/technical-blog/adding-fields-to-quicksearch