Examples of LLValue


Examples of com.opentext.api.LLValue

  /** {@inheritDoc} */
  @Override
  public synchronized ClientValue AttrGetInfo(ClientValue categoryVersion,
      String attributeName, ClientValue attributeSetPath)
      throws RepositoryException {
    LLValue info = new LLValue();
    try {
      LLValue catVersion =
          ((LapiClientValue) categoryVersion).getLLValue();
      LLValue attrPath = (attributeSetPath == null) ? null :
          ((LapiClientValue) attributeSetPath).getLLValue();

      // LAPI AttrGetInfo method does not reset the session status.
      session.setError(0, "");
      if (attributes.AttrGetInfo(catVersion, attributeName, attrPath,
View Full Code Here

Examples of com.opentext.api.LLValue

  /** {@inheritDoc} */
  @Override
  public synchronized ClientValue AttrGetValues(ClientValue categoryVersion,
      String attributeName, ClientValue attributeSetPath)
      throws RepositoryException {
    LLValue attrValues = new LLValue();
    try {
      LLValue catVersion =
          ((LapiClientValue) categoryVersion).getLLValue();
      LLValue attrPath = (attributeSetPath == null) ? null :
          ((LapiClientValue) attributeSetPath).getLLValue();

      // LAPI AttrGetValues method does not reset the session status.
      session.setError(0, "");
      if (attributes.AttrGetValues(catVersion, attributeName,
View Full Code Here

Examples of com.opentext.api.LLValue

  /** {@inheritDoc} */
  @Override
  public synchronized ClientValue ListObjectCategoryIDs(
      ClientValue objectIdAssoc) throws RepositoryException {
    LLValue categoryIds = new LLValue();
    try {
      LLValue objIDa = ((LapiClientValue) objectIdAssoc).getLLValue();
      if (documents.ListObjectCategoryIDs(objIDa, categoryIds) != 0)
        throw new LapiException(session, LOGGER);
    } catch (RuntimeException e) {
      throw getLivelinkException(e);
    }
View Full Code Here

Examples of com.opentext.api.LLValue

  /** {@inheritDoc} */
  @Override
  public synchronized ClientValue GetVersionInfo(int volumeId, int objectId,
      int versionNumber) throws RepositoryException {
    LLValue versionInfo = new LLValue();
    try {
      if (documents.GetVersionInfo(volumeId, objectId, versionNumber,
              versionInfo) != 0) {
        throw new LapiException(session, LOGGER);
      }
View Full Code Here

Examples of com.opentext.api.LLValue

  /** {@inheritDoc} */
  @Override
  public synchronized ClientValue GetObjectRights(int objectId)
      throws RepositoryException {
    LLValue recArray = new LLValue();
    try {
      if (documents.GetObjectRights(0, objectId, recArray) != 0) {
        throw new LapiException(session, LOGGER);
      }
    } catch (RuntimeException e) {
View Full Code Here

Examples of com.opentext.api.LLValue

   * read the certificates, write them to a file, then read
   * them, since the admin may not have generic filesystem
   * access to the GSA if the connectors are running there.
   */
  public void setCaRootCerts(List<String> value) {
    LLValue list = new LLValue().setList();
    for (int i = 0; i < value.size(); i++) {
      String certEntry = value.get(i);
      // If the config form property is empty, and a
      // directory is provided in connectorInstance.xml
      // (making the list non-empty), skip the empty
      // string. I don't think it's possible to get a null
      // value in the list, but it won't hurt to check.
      if (certEntry == null || certEntry.length() == 0)
        continue;
      File certDir = new File(certEntry);
      if (certDir.exists() && certDir.isDirectory()) {
        if (LOGGER.isLoggable(Level.CONFIG)) {
          LOGGER.config("Reading certificates from " +
              certDir.getAbsolutePath());
        }
        LLValue rootCACertsList = new LLValue();
        LLSession.GetCARootCerts(certDir.getAbsolutePath(), rootCACertsList);
        int size = rootCACertsList.size();
        if (LOGGER.isLoggable(Level.CONFIG))
          LOGGER.config("Found " + size + " certificates");
        for (int j = 0; j < size; j++)
          list.add(rootCACertsList.toValue(j));
      }
      else {
        LLValue cert = new LLValue().setString(certEntry);
        list.add(cert);
      }
    }
    setConfig("CARootCerts", list);
  }
View Full Code Here

Examples of com.opentext.api.LLValue

    /** {@inheritDoc} */
    @Override
    public ClientValue stringToValue() throws RepositoryException {
        String s = value.toString();
        try {
            LLValue sv = LLValue.crack(
                new LLInputStream(
                    new PushbackInputStream(
                        new ByteArrayInputStream(s.getBytes(Charsets.UTF_8))),
                    "UTF-8"));
            if (LOGGER.isLoggable(Level.FINEST))
View Full Code Here

Examples of com.opentext.api.LLValue

  private void connect()
    throws ManifoldCFException
  {
    try
    {
      LLValue configuration;

      if (useHttp)
      {
        boolean useNTLM;
        String userNameAndDomain;

        if (httpNtlmDomain != null && httpNtlmUser != null)
        {
          useNTLM = true;
          userNameAndDomain = httpNtlmDomain + "\\" + httpNtlmUser;
        }
        else
        {
          useNTLM = false;
          userNameAndDomain = httpNtlmUser;
        }
        configuration = new LLValue();
        configuration.setAssoc();
        configuration.add("Encoding","UTF-8");
        configuration.add("LivelinkCGI", httpCgiPath);
        if (userNameAndDomain != null)
        {
          configuration.add("HTTPUserName", userNameAndDomain);
          configuration.add("HTTPPassword", httpNtlmPassword);
        }
        if (useNTLM)
          configuration.add("EnableNTLM", LLValue.LL_TRUE);
        else
          configuration.add("EnableNTLM", LLValue.LL_FALSE);

        if (useSSL)
        {
          configuration.add("HTTPS", LLValue.LL_TRUE);
          // Create the place to put the certs
          createCertFolder();
          if (keystore != null)
          {
            // Now, write the certs themselves
            String[] aliases = keystore.getContents();
            for (String alias : aliases)
            {
              java.security.cert.Certificate cert = keystore.getCertificate(alias);
              byte[] certData = cert.getEncoded();
              File fileName = new File(certFolder,ManifoldCF.safeFileName(alias) + ".cer");
              OutputStream fos = new FileOutputStream(fileName);
              try
              {
                Writer osw = new OutputStreamWriter(fos,StandardCharsets.UTF_8);
                try
                {
                  String certBase64 = new Base64().encodeByteArray(certData);
                  osw.write("-----BEGIN CERTIFICATE-----\n");
                  int index = 0;
                  while (true)
                  {
                    if (certBase64.length() - index > 64)
                    {
                      osw.write(certBase64.substring(index,index+64) + "\n");
                      index += 64;
                    }
                    else
                    {
                      osw.write(certBase64.substring(index) + "\n");
                      break;
                    }
                  }
                  osw.write("-----END CERTIFICATE-----\n");
                }
                finally
                {
                  osw.flush();
                }
              }
              finally
              {
                fos.flush();
                fos.close();
              }
            }
          }
          LLValue rootCACertList = new LLValue();
          LLSession.GetCARootCerts(certFolder.toString(),rootCACertList);
          configuration.add("CARootCerts", rootCACertList);
        }
        else
        {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.