org.apache.maven.settings.Server.getFilePermissions()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(4.8k)|赞(0)|评价(0)|浏览(184)

本文整理了Java中org.apache.maven.settings.Server.getFilePermissions()方法的一些代码示例,展示了Server.getFilePermissions()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Server.getFilePermissions()方法的具体详情如下:
包路径:org.apache.maven.settings.Server
类名称:Server
方法名:getFilePermissions

Server.getFilePermissions介绍

[英]Get the permissions for files when they are created.
[中]获取文件创建时的权限。

代码示例

代码示例来源:origin: apache/maven

if ( server.getFilePermissions() != null )
  serializer.startTag( NAMESPACE, "filePermissions" ).text( server.getFilePermissions() ).endTag( NAMESPACE, "filePermissions" );

代码示例来源:origin: apache/maven

configProps.put( "aether.connector.perms.fileMode." + server.getId(), server.getFilePermissions() );
configProps.put( "aether.connector.perms.dirMode." + server.getId(), server.getDirectoryPermissions() );

代码示例来源:origin: org.apache.maven/maven-settings

if ( server.getFilePermissions() != null )
  serializer.startTag( NAMESPACE, "filePermissions" ).text( server.getFilePermissions() ).endTag( NAMESPACE, "filePermissions" );

代码示例来源:origin: org.codehaus.mojo/wagon-maven-plugin

private static RepositoryPermissions getPermissions( String id, Settings settings )
{
  // May not have an id
  if ( StringUtils.isBlank( id ) )
  {
    return null;
  }
  // May not be a server matching that id
  Server server = settings.getServer( id );
  if ( server == null )
  {
    return null;
  }
  // Extract perms (if there are any)
  String filePerms = server.getFilePermissions();
  String dirPerms = server.getDirectoryPermissions();
  // Check to see if custom permissions were supplied
  if ( StringUtils.isBlank( filePerms ) && StringUtils.isBlank( dirPerms ) )
  {
    return null;
  }
  // There are custom permissions specified in settings.xml for this server
  RepositoryPermissions permissions = new RepositoryPermissions();
  permissions.setFileMode( filePerms );
  permissions.setDirectoryMode( dirPerms );
  return permissions;
}

代码示例来源:origin: org.apache.maven.continuum/continuum-core

server.getPrivateKey(), server.getPassphrase() );
wagonManager.addPermissionInfo( server.getId(), server.getFilePermissions(),
                server.getDirectoryPermissions() );

代码示例来源:origin: org.netbeans.api/org-netbeans-modules-maven-embedder

/**
 * Method updateServer.
 * 
 * @param value
 * @param element
 * @param counter
 * @param xmlTag
 */
protected void updateServer(Server value, String xmlTag, Counter counter, Element element)
{
  Element root = element;
  Counter innerCount = new Counter(counter.getDepth() + 1);
  findAndReplaceSimpleElement(innerCount, root,  "username", value.getUsername(), null);
  findAndReplaceSimpleElement(innerCount, root,  "password", value.getPassword(), null);
  findAndReplaceSimpleElement(innerCount, root,  "privateKey", value.getPrivateKey(), null);
  findAndReplaceSimpleElement(innerCount, root,  "passphrase", value.getPassphrase(), null);
  findAndReplaceSimpleElement(innerCount, root,  "filePermissions", value.getFilePermissions(), null);
  findAndReplaceSimpleElement(innerCount, root,  "directoryPermissions", value.getDirectoryPermissions(), null);
  findAndReplaceXpp3DOM(innerCount, root, "configuration", (Xpp3Dom)value.getConfiguration());
  findAndReplaceSimpleElement(innerCount, root,  "id", value.getId(), null);
} //-- void updateServer(Server, String, Counter, Element)

代码示例来源:origin: org.codehaus.mevenide/nb-mvn-embedder

/**
 * Method updateServer
 * 
 * @param value
 * @param element
 * @param counter
 * @param xmlTag
 */
protected void updateServer(Server value, String xmlTag, Counter counter, Element element)
{
  Element root = element;
  Counter innerCount = new Counter(counter.getDepth() + 1);
  findAndReplaceSimpleElement(innerCount, root,  "username", value.getUsername(), null);
  findAndReplaceSimpleElement(innerCount, root,  "password", value.getPassword(), null);
  findAndReplaceSimpleElement(innerCount, root,  "privateKey", value.getPrivateKey(), null);
  findAndReplaceSimpleElement(innerCount, root,  "passphrase", value.getPassphrase(), null);
  findAndReplaceSimpleElement(innerCount, root,  "filePermissions", value.getFilePermissions(), null);
  findAndReplaceSimpleElement(innerCount, root,  "directoryPermissions", value.getDirectoryPermissions(), null);
  findAndReplaceXpp3DOM(innerCount, root, "configuration", (Xpp3Dom)value.getConfiguration());
  findAndReplaceSimpleElement(innerCount, root,  "id", value.getId(), null);
} //-- void updateServer(Server, String, Counter, Element)

代码示例来源:origin: org.apache.continuum/continuum-buildagent-core

server.getPrivateKey(), server.getPassphrase() );
wagonManager.addPermissionInfo( server.getId(), server.getFilePermissions(),
                server.getDirectoryPermissions() );

代码示例来源:origin: org.apache.continuum/continuum-core

server.getPrivateKey(), server.getPassphrase() );
wagonManager.addPermissionInfo( server.getId(), server.getFilePermissions(),
                server.getDirectoryPermissions() );

代码示例来源:origin: org.jvnet.hudson/maven-embedder

server.getPrivateKey(), server.getPassphrase());
wagonManager.addPermissionInfo(server.getId(), server.getFilePermissions(),
    server.getDirectoryPermissions());

相关文章