Tabnine Logo
Principal
Code IndexAdd Tabnine to your IDE (free)

How to use
Principal
in
com.sun.enterprise.deployment.runtime.connector

Best Java code snippets using com.sun.enterprise.deployment.runtime.connector.Principal (Showing top 4 results out of 315)

origin: org.glassfish.main.deployment/dol

  /**
   * write the descriptor class to a DOM tree and return it
   *
   * @param parent node for the DOM tree
   * @param node name for the descriptor
   * @param the descriptor to write
   * @return the DOM tree top node
   */    
  public Node writeDescriptor(Node parent, String nodeName, Principal descriptor) {
  Element principalNode = (Element) super.writeDescriptor(parent, nodeName, descriptor);
  appendTextChild(principalNode, RuntimeTagNames.DESCRIPTION, descriptor.getDescription());
  setAttribute(principalNode, RuntimeTagNames.USER_NAME, (String) descriptor.getValue(Principal.USER_NAME));
  setAttribute(principalNode, RuntimeTagNames.PASSWORD, (String) descriptor.getValue(Principal.PASSWORD));
  setAttribute(principalNode, RuntimeTagNames.CREDENTIAL, (String) descriptor.getValue(Principal.CREDENTIAL));
  return principalNode;
  }
}
origin: org.glassfish.deployment/dol

/**
 * Adds  a new DOL descriptor instance to the descriptor instance associated with 
 * this XMLNode
 *
 * @param descriptor the new descriptor
 */
public void addDescriptor(Object newDescriptor) {
MapElement descriptor = (MapElement) getDescriptor();
if (descriptor==null) {
  throw new RuntimeException("Cannot set info on null descriptor");
}
if (newDescriptor instanceof Principal) {
  Principal principal = (Principal) newDescriptor;
  if (principal.getValue(Principal.CREDENTIAL)==null) {
  descriptor.addPrincipal(principal);
  } else {
  descriptor.setBackendPrincipal(true);
  descriptor.setAttributeValue(MapElement.BACKEND_PRINCIPAL, Principal.USER_NAME, principal.getValue(Principal.USER_NAME));
  descriptor.setAttributeValue(MapElement.BACKEND_PRINCIPAL, Principal.PASSWORD, principal.getValue(Principal.PASSWORD));
  descriptor.setAttributeValue(MapElement.BACKEND_PRINCIPAL, Principal.CREDENTIAL, principal.getValue(Principal.CREDENTIAL));
  
  }
}
}

origin: org.glassfish.main.deployment/dol

/**
 * Adds  a new DOL descriptor instance to the descriptor instance associated with 
 * this XMLNode
 *
 * @param descriptor the new descriptor
 */
public void addDescriptor(Object newDescriptor) {
MapElement descriptor = (MapElement) getDescriptor();
if (descriptor==null) {
  throw new RuntimeException("Cannot set info on null descriptor");
}
if (newDescriptor instanceof Principal) {
  Principal principal = (Principal) newDescriptor;
  if (principal.getValue(Principal.CREDENTIAL)==null) {
  descriptor.addPrincipal(principal);
  } else {
  descriptor.setBackendPrincipal(true);
  descriptor.setAttributeValue(MapElement.BACKEND_PRINCIPAL, Principal.USER_NAME, principal.getValue(Principal.USER_NAME));
  descriptor.setAttributeValue(MapElement.BACKEND_PRINCIPAL, Principal.PASSWORD, principal.getValue(Principal.PASSWORD));
  descriptor.setAttributeValue(MapElement.BACKEND_PRINCIPAL, Principal.CREDENTIAL, principal.getValue(Principal.CREDENTIAL));
  
  }
}
}

origin: org.glassfish.deployment/dol

  /**
   * write the descriptor class to a DOM tree and return it
   *
   * @param parent node for the DOM tree
   * @param node name for the descriptor
   * @param the descriptor to write
   * @return the DOM tree top node
   */    
  public Node writeDescriptor(Node parent, String nodeName, Principal descriptor) {
  Element principalNode = (Element) super.writeDescriptor(parent, nodeName, descriptor);
  appendTextChild(principalNode, RuntimeTagNames.DESCRIPTION, descriptor.getDescription());
  setAttribute(principalNode, RuntimeTagNames.USER_NAME, (String) descriptor.getValue(Principal.USER_NAME));
  setAttribute(principalNode, RuntimeTagNames.PASSWORD, (String) descriptor.getValue(Principal.PASSWORD));
  setAttribute(principalNode, RuntimeTagNames.CREDENTIAL, (String) descriptor.getValue(Principal.CREDENTIAL));
  return principalNode;
  }
}
com.sun.enterprise.deployment.runtime.connectorPrincipal

Javadoc

This class was based on the schema2beans generated one modified to remove its dependencies on schema2beans libraries.

Most used methods

  • getDescription
  • getValue

Popular in Java

  • Parsing JSON documents to java classes using gson
  • runOnUiThread (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • setContentView (Activity)
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • Permission (java.security)
    Legacy security code; do not use.
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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