congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
ContextItems.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.carewebframework.api.context.ContextItems
constructor

Best Java code snippets using org.carewebframework.api.context.ContextItems.<init> (Showing top 4 results out of 315)

origin: org.carewebframework/org.carewebframework.api.core

/**
 * Returns the marshaled context representing the state of all shared contexts.
 *
 * @return A ContextItems object representing the current state of all shared contexts.
 */
public ContextItems getMarshaledContext() {
  ContextItems marshaledContext = new ContextItems();
  for (IManagedContext<?> managedContext : managedContexts) {
    marshaledContext.addItems(managedContext.getContextItems(false));
  }
  return marshaledContext;
}
origin: org.carewebframework/org.carewebframework.api

/**
 * Returns the marshaled context representing the state of all shared contexts.
 * 
 * @return A ContextItems object representing the current state of all shared contexts.
 */
public ContextItems getMarshaledContext() {
  ContextItems marshaledContext = new ContextItems();
  
  for (IManagedContext managedContext : managedContexts) {
    marshaledContext.addItems(managedContext.getContextItems(false));
  }
  
  return marshaledContext;
}

origin: org.carewebframework/org.carewebframework.api.core

  /**
   * Unmarshals the marshaled context. Performs digital signature verification, then returns the
   * unmarshaled context items.
   * 
   * @param marshaledContext Marshaled context
   * @param authSignature If set, the digital signature is verified.
   * @return The unmarshaled context.
   * @throws Exception Unspecified exception.
   */
  public ContextItems unmarshal(String marshaledContext, String authSignature) throws Exception {
    ContextItems contextItems = new ContextItems();
    contextItems.addItems(marshaledContext);
    String whichKey = contextItems.getItem(PROPNAME_KEY);
    String timestamp = contextItems.getItem(PROPNAME_TIME);
    
    if (authSignature != null && !signer.verify(authSignature, marshaledContext, timestamp, whichKey)) {
      throw new MarshalException("Invalid digital signature");
    }
    
    return contextItems;
  }
}
origin: org.carewebframework/org.carewebframework.api

  /**
   * Unmarshals the marshaled context. Performs digital signature verification, then returns the
   * unmarshaled context items.
   * 
   * @param marshaledContext Marshaled context
   * @param authSignature If set, the digital signature is verified.
   * @return The unmarshaled context.
   * @throws Exception Unspecified exception.
   */
  public ContextItems unmarshal(String marshaledContext, String authSignature) throws Exception {
    ContextItems contextItems = new ContextItems();
    contextItems.addItems(marshaledContext);
    String whichKey = contextItems.getItem(PROPNAME_KEY);
    String timestamp = contextItems.getItem(PROPNAME_TIME);
    
    if (authSignature != null && !signer.verify(authSignature, marshaledContext, timestamp, whichKey)) {
      throw new MarshalException("Invalid digital signature");
    }
    
    return contextItems;
  }
}
org.carewebframework.api.contextContextItems<init>

Popular methods of ContextItems

  • setItem
    Sets a context item value, qualified with the specified suffix.
  • addItems
    Adds context items to this set.
  • clear
    Clear all context items and the index.
  • getItem
    Retrieves a context item qualified by a suffix.
  • getItemNames
    Returns a set of all item names.
  • getSuffixes
    Returns a map consisting of suffixes of context items that match the specified prefix.
  • lookupItemName
    Performs a case-insensitive lookup of the item name in the index.
  • normalizePrefix
    Normalizes a prefix by appending a "." if necessary and converting to lower case.
  • toString
    Serializes the context item set to a string.

Popular in Java

  • Reading from database using SQL prepared statement
  • getApplicationContext (Context)
  • runOnUiThread (Activity)
  • getContentResolver (Context)
  • Pointer (com.sun.jna)
    An abstraction for a native pointer data type. A Pointer instance represents, on the Java side, a na
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now