congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Authority.getId
Code IndexAdd Tabnine to your IDE (free)

How to use
getId
method
in
org.alfresco.repo.domain.permissions.Authority

Best Java code snippets using org.alfresco.repo.domain.permissions.Authority.getId (Showing top 9 results out of 315)

origin: org.alfresco/alfresco-repository

public Ace getAce(Permission permission, Authority authority, ACEType type, AccessStatus accessStatus)
{
  ParameterCheck.mandatory("permission", permission);
  ParameterCheck.mandatory("authority", authority);
  ParameterCheck.mandatory("type", type);
  ParameterCheck.mandatory("accessStatus", accessStatus);
  
  return getAceEntity(permission.getId(),
            authority.getId(),
            ((accessStatus == AccessStatus.ALLOWED) ? true : false), 
            type);
}
 
origin: Alfresco/alfresco-repository

public Ace getAce(Permission permission, Authority authority, ACEType type, AccessStatus accessStatus)
{
  ParameterCheck.mandatory("permission", permission);
  ParameterCheck.mandatory("authority", authority);
  ParameterCheck.mandatory("type", type);
  ParameterCheck.mandatory("accessStatus", accessStatus);
  
  return getAceEntity(permission.getId(),
            authority.getId(),
            ((accessStatus == AccessStatus.ALLOWED) ? true : false), 
            type);
}
 
origin: Alfresco/alfresco-repository

@Override
protected int updateAuthorityEntity(AuthorityEntity authorityEntity)
{
  Authority existingAuthorityEntity = getAuthority(authorityEntity.getAuthority());
  if(existingAuthorityEntity != null)
  {
    for(Ace ace : getAceEntitiesByAuthority(existingAuthorityEntity.getId()))
    {
      AceEntity aceEntity = getAceEntity(ace.getId());
      aceEntity.setAuthorityId(authorityEntity.getId());
      updateAceEntity(aceEntity);
    }
    deleteAuthority(existingAuthorityEntity.getId());
  }
  
  authorityEntity.incrementVersion();
  
  return template.update(UPDATE_AUTHORITY, authorityEntity);
}
 
origin: org.alfresco/alfresco-repository

@Override
protected int updateAuthorityEntity(AuthorityEntity authorityEntity)
{
  Authority existingAuthorityEntity = getAuthority(authorityEntity.getAuthority());
  if(existingAuthorityEntity != null)
  {
    for(Ace ace : getAceEntitiesByAuthority(existingAuthorityEntity.getId()))
    {
      AceEntity aceEntity = getAceEntity(ace.getId());
      aceEntity.setAuthorityId(authorityEntity.getId());
      updateAceEntity(aceEntity);
    }
    deleteAuthority(existingAuthorityEntity.getId());
  }
  
  authorityEntity.incrementVersion();
  
  return template.update(UPDATE_AUTHORITY, authorityEntity);
}
 
origin: org.alfresco/alfresco-repository

List<Ace> unreferenced = aclCrudDAO.getAcesByAuthority(authEntity.getId());
  aclCrudDAO.deleteAuthority(authEntity.getId());
origin: Alfresco/alfresco-repository

List<Ace> unreferenced = aclCrudDAO.getAcesByAuthority(authEntity.getId());
  aclCrudDAO.deleteAuthority(authEntity.getId());
origin: Alfresco/alfresco-repository

public void testCreateUpdateAndDeleteAuth() throws Exception
{
  final String authName = getName() + "-" + System.currentTimeMillis();
  
  Authority authEntity= getAuth(authName);
  assertNull(authEntity);
  
  Authority createAuthEntity = createAuth(authName);
  assertNotNull(createAuthEntity);
  
  authEntity= getAuth(authName);
  assertEquals(createAuthEntity, authEntity);
  
  String newAuthName = authName+"-new";
  updateAuth(authName, newAuthName);
  
  assertNull(getAuth(authName));
  
  authEntity = getAuth(newAuthName);
  assertNotNull(authEntity);
  assertEquals(createAuthEntity.getId(), authEntity.getId());
  assertEquals(newAuthName, authEntity.getAuthority());
  
  deleteAuth(authEntity.getId());
  
  assertNull(getAuth(newAuthName));
}
 
origin: org.alfresco/alfresco-repository

public Ace createAce(Permission permission, Authority authority, ACEType type, AccessStatus accessStatus)
{
  ParameterCheck.mandatory("permission", permission);
  ParameterCheck.mandatory("authority", authority);
  ParameterCheck.mandatory("type", type);
  ParameterCheck.mandatory("accessStatus", accessStatus);
  
  AceEntity entity = new AceEntity();
  
  entity.setApplies(type.getId()); // note: 'applies' stores the ACE type
  entity.setAllowed((accessStatus == AccessStatus.ALLOWED) ? true : false);
  entity.setAuthorityId(authority.getId());
  entity.setPermissionId(permission.getId());
  
  long aceId = createAceEntity(entity);
  
  entity.setVersion(0L);
  entity.setId(aceId);
  
  return entity;
}
 
origin: Alfresco/alfresco-repository

public Ace createAce(Permission permission, Authority authority, ACEType type, AccessStatus accessStatus)
{
  ParameterCheck.mandatory("permission", permission);
  ParameterCheck.mandatory("authority", authority);
  ParameterCheck.mandatory("type", type);
  ParameterCheck.mandatory("accessStatus", accessStatus);
  
  AceEntity entity = new AceEntity();
  
  entity.setApplies(type.getId()); // note: 'applies' stores the ACE type
  entity.setAllowed((accessStatus == AccessStatus.ALLOWED) ? true : false);
  entity.setAuthorityId(authority.getId());
  entity.setPermissionId(permission.getId());
  
  long aceId = createAceEntity(entity);
  
  entity.setVersion(0L);
  entity.setId(aceId);
  
  return entity;
}
 
org.alfresco.repo.domain.permissionsAuthoritygetId

Popular methods of Authority

  • getAuthority

Popular in Java

  • Finding current android device location
  • findViewById (Activity)
  • getContentResolver (Context)
  • runOnUiThread (Activity)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • Timer (java.util)
    Timers schedule one-shot or recurring TimerTask for execution. Prefer java.util.concurrent.Scheduled
  • TimeUnit (java.util.concurrent)
    A TimeUnit represents time durations at a given unit of granularity and provides utility methods to
  • BoxLayout (javax.swing)
  • Github Copilot 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